bug-cfengine
[Top][All Lists]
Advanced

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

SplitLine bug in filters.c


From: Bas van der Vlies
Subject: SplitLine bug in filters.c
Date: Fri, 01 Aug 2003 11:40:14 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

cfengine: 2.0.7p3

I uss the filters commadn to determine if PPID=1. In cfengine 2.0.5
i get the right values but in cfengine 2.0.7p3 it is broken. The code
has changed between this version in SplitLine. I have applied the
following simple patch and now it works again for me, see attachment


--
--
********************************************************************
*                                                                  *
*  Bas van der Vlies                     e-mail: address@hidden      *
*  SARA - Academic Computing Services    phone:  +31 20 592 8012   *
*  Kruislaan 415                         fax:    +31 20 6683167    *
*  1098 SJ Amsterdam                                               *
*                                                                  *
********************************************************************

--- cfengine-2.0.7p3-old/src/filters.c  Fri Aug  1 10:59:13 2003
+++ cfengine-2.0.7p3/src/filters.c      Fri Aug  1 11:00:37 2003
@@ -1484,7 +1484,10 @@
         }
       }

-   if (s < e)
+   /*
+    *  HvB: Bas van der Vlies else we can bad splits
+   */
+   if (s <= e)
       {
       line[i] = (char *)malloc(e-s+2);
       bzero(line[i],(e-s+2));


reply via email to

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