+2009-12-31 Eirik Byrkjeflot Anonsen <eirik@opera.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * objcopy.c (add_redefine_syms_file): Avoid symbol buffer
+ overrun.
+
2009-12-21 Alan Modra <amodra@gmail.com>
* MAINTAINERS: Update my email address.
filename, strerror (errno));
bufsize = 100;
- buf = (char *) xmalloc (bufsize);
+ buf = (char *) xmalloc (bufsize + 1 /* For the terminating NUL. */);
lineno = 1;
c = getc (file);
if (len >= bufsize)
{
bufsize *= 2;
- buf = (char *) xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize + 1);
}
c = getc (file);
}
if (len >= bufsize)
{
bufsize *= 2;
- buf = (char *) xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize + 1);
}
c = getc (file);
}