mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
buffer overflow in cmdline_add_object_only_section
Seen running ld-plugin/lto-4r-c on x86_64-w64-mingw32 * ldlang.c (cmdline_add_object_only_section): Allocate one more for output symbol buffer.
This commit is contained in:
@@ -10728,7 +10728,7 @@ cmdline_add_object_only_section (bfd_byte *contents, size_t size)
|
||||
long src_count = 0, dst_count = 0;
|
||||
asymbol **from, **to;
|
||||
|
||||
osympp = (asymbol **) xmalloc (symcount * sizeof (asymbol *));
|
||||
osympp = xmalloc ((symcount + 1) * sizeof (asymbol *));
|
||||
from = isympp;
|
||||
to = osympp;
|
||||
for (; src_count < symcount; src_count++)
|
||||
|
||||
Reference in New Issue
Block a user