Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(34)

Unified Diff: binutils/binutils/objcopy.c

Issue 3018030: [binutils] Bump binutils to 2.20.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « binutils/binutils/doc/Makefile.in ('k') | binutils/binutils/objdump.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: binutils/binutils/objcopy.c
diff --git a/binutils/binutils/objcopy.c b/binutils/binutils/objcopy.c
index 2048827f8e17f21d9bdf06545466247f7b2b1fc2..e0cac197f1ff9c15e104f31422a34a643d221a2f 100644
--- a/binutils/binutils/objcopy.c
+++ b/binutils/binutils/objcopy.c
@@ -1237,7 +1237,7 @@ add_redefine_syms_file (const char *filename)
filename, strerror (errno));
bufsize = 100;
- buf = (char *) xmalloc (bufsize);
+ buf = (char *) xmalloc (bufsize + 1 /* For the terminating NUL. */);
lineno = 1;
c = getc (file);
@@ -1254,7 +1254,7 @@ add_redefine_syms_file (const char *filename)
if (len >= bufsize)
{
bufsize *= 2;
- buf = (char *) xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize + 1);
}
c = getc (file);
}
@@ -1280,7 +1280,7 @@ add_redefine_syms_file (const char *filename)
if (len >= bufsize)
{
bufsize *= 2;
- buf = (char *) xrealloc (buf, bufsize);
+ buf = (char *) xrealloc (buf, bufsize + 1);
}
c = getc (file);
}
« no previous file with comments | « binutils/binutils/doc/Makefile.in ('k') | binutils/binutils/objdump.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698