UMR in actsync

Alex Kiernan alexk at demon.net
Wed Feb 14 11:22:51 UTC 2001



I was seeing this in actsync:

****  Purify instrumented actsync (pid 28263)  ****
UMR: Uninitialized memory read:
  * This is occurring while in:
        merge_grps     [actsync.c:1926]
        main           [actsync.c:321]
        _start         [crt1.o]
  * Reading 4 bytes from 0x109fa90 in the heap.
  * Address 0x109fa90 is 4078176 bytes into a malloc'd block at 0xcbc030 of 4080
000 bytes.
  * This block was allocated from:
        malloc         [rtlib.o]
        realloc        [rtlib.o]
        get_active     [actsync.c:910]
        main           [actsync.c:308]
        _start         [crt1.o]

I think this is the right fix (but the boundary conditions are getting
me tied in knots - can someone else check):

Index: backends/actsync.c
===================================================================
RCS file: /upstream-repositories/inn-cvs.isc.org/inn/backends/actsync.c,v
retrieving revision 1.29
diff -u -r1.29 actsync.c
--- backends/actsync.c	2000/11/09 09:25:26	1.29
+++ backends/actsync.c	2001/02/14 10:52:33
@@ -1923,7 +1923,7 @@
 	/* assert: cur & nxt are not the same group from the same host */
 
 	/* if nxt is ignored, look for the next non-ignored group */
-	while (grp[nxt].ignore && nxt < grplen) {
+	while (nxt < grplen && grp[nxt].ignore) {
 	    ++nxt;
 	}
 	/* assert: cur is not ignored */


-- 
Alex Kiernan, Principal Engineer, Development, Thus PLC


More information about the inn-patches mailing list