bug-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HostRange bug


From: Jim Wight
Subject: Re: HostRange bug
Date: Tue, 7 Sep 2004 13:18:49 +0100

> There appears to be a bug in the handling of HostRange in 2.1.10 and
> earlier which may mean - it is certainly true in some circumstances -
> that it is not possible to use HostRange more than once.

[snip]

> show that VDEFAULTBINSERVER.name is getting corrupted between calls to
> HandleHostRange (in functions.c).

The bug is in the loop starting at line 1079 in FuzzyHostMatch in item.c:

  for (sp = s2; sp < s2+strlen(s2); sp++ )
     {
     if ( isdigit((int)*sp) )
        {
        *sp = '\0';
        break;
        }
     }

The loop modifies the string pointed to by s2 (the seond argument), and
FuzzyHostMatch is called from HandleHostRange in functions.c with
VDEFAULTBINSERVER.name as the second argument.

Jim





reply via email to

[Prev in Thread] Current Thread [Next in Thread]