Thread View: comp.bugs.misc
1 messages
1 total messages
Started by Matt Costello
Wed, 01 Jul 1987 21:08
Minor bug in Pathalias
Author: Matt Costello
Date: Wed, 01 Jul 1987 21:08
Date: Wed, 01 Jul 1987 21:08
40 lines
1815 bytes
1815 bytes
There is a minor bug in the pathalias(1) program.
The bug causes pathalias to dump core when it runs out of
memory. It is in the routine mymalloc() in the file mem.c;
its sccsid is
mem.c 8.3 (down!honey) 86/06/08
The problem is that the mymalloc() routine does not check the
malloc(3) return value before trying to clear the memory returned
by malloc. The published maps are getting big enough that a
process size of 1 MB is no longer big enough to run pathalias.
This bug is present in both the January 1986 and November 1986
distributions. The following is a context diff of the change
for the November 1986 distribution:
*** mem.c.orig Fri Feb 6 20:54:24 1987
--- mem.c Wed Jul 1 13:24:38 1987
***************
*** 199,205
if (n >= 1024) { /* for hash table */
rval = malloc(n); /* aligned */
! strclear(rval, n);
return(rval);
}
--- 199,206 -----
if (n >= 1024) { /* for hash table */
rval = malloc(n); /* aligned */
! if (rval != 0)
! strclear(rval, n);
return(rval);
}
--
Matt Costello <matt.costello@SanDiego.NCR.COM>
+1 619 485 2926 <matt.costello%SanDiego.NCR.COM@Relay.CS.NET>
{sdcsvax,cbosgd,pyramid,nosc.ARPA,ihnp4}!ncr-sd!matt
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads