mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-05 21:50:21 +08:00
* elf.c (bfd_section_from_shdr): Fail if name is NULL.
Prevent endless recursion on broken objects. * archive.c (do_slurp_coff_armap): Check for overflows.
This commit is contained in:
@ -821,9 +821,15 @@ do_slurp_coff_armap (bfd *abfd)
|
||||
/* The coff armap must be read sequentially. So we construct a
|
||||
bsd-style one in core all at once, for simplicity. */
|
||||
|
||||
if (nsymz > ~ (bfd_size_type) 0 / sizeof (carsym))
|
||||
return FALSE;
|
||||
|
||||
carsym_size = (nsymz * sizeof (carsym));
|
||||
ptrsize = (4 * nsymz);
|
||||
|
||||
if (carsym_size + stringsize + 1 <= carsym_size)
|
||||
return FALSE;
|
||||
|
||||
ardata->symdefs = bfd_zalloc (abfd, carsym_size + stringsize + 1);
|
||||
if (ardata->symdefs == NULL)
|
||||
return FALSE;
|
||||
|
Reference in New Issue
Block a user