Off by one patch
Michael Meissner
meissner@cygnus.com
Mon Mar 16 13:13:00 GMT 1998
I've fixed the development branch, but I think this should also go out
to the 1.0.2 release if it hasn't gone out the door yet.
Mon Mar 16 15:57:17 1998 Michael Meissner <meissner@cygnus.com>
* gcc.c (default_arg): Don't wander off the end of allocated
memory.
*** gcc/gcc.c.~1~ Mon Sep 1 13:02:40 1997
--- gcc/gcc.c Mon Mar 16 16:08:59 1998
*************** default_arg (p, len)
*** 5210,5215 ****
--- 5210,5218 ----
if ((end - start) == len && strncmp (p, start, len) == 0)
return 1;
+
+ if (*end == '\0')
+ break;
}
return 0;
--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com, 617-354-5416 (office), 617-354-7161 (fax)
More information about the Gcc-bugs
mailing list