projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix address violation issues encountered when parsing corrupt binaries.
[deliverable/binutils-gdb.git]
/
bfd
/
mach-o.c
diff --git
a/bfd/mach-o.c
b/bfd/mach-o.c
index 1807391d51be22bd3ec836b1425e432b19efbb92..9fe6326a299bc86d4ff4e86824b90a78e60959a3 100644
(file)
--- a/
bfd/mach-o.c
+++ b/
bfd/mach-o.c
@@
-3749,6
+3749,9
@@
bfd_mach_o_read_symtab_strtab (bfd *abfd)
}
else
{
}
else
{
+ /* See PR 21840 for a reproducer. */
+ if ((sym->strsize + 1) == 0)
+ return FALSE;
sym->strtab = bfd_alloc (abfd, sym->strsize + 1);
if (sym->strtab == NULL)
return FALSE;
sym->strtab = bfd_alloc (abfd, sym->strsize + 1);
if (sym->strtab == NULL)
return FALSE;
This page took
0.024532 seconds
and
4
git commands to generate.