Lines 784-789
elf_object_p (bfd *abfd)
Link Here
|
784 |
if (i_ehdrp->e_phnum > ((bfd_size_type) -1) / sizeof (*i_phdr)) |
784 |
if (i_ehdrp->e_phnum > ((bfd_size_type) -1) / sizeof (*i_phdr)) |
785 |
goto got_wrong_format_error; |
785 |
goto got_wrong_format_error; |
786 |
#endif |
786 |
#endif |
|
|
787 |
/* Check for a corrupt input file with an impossibly large number |
788 |
of program headers. */ |
789 |
if (bfd_get_file_size (abfd) > 0 |
790 |
&& i_ehdrp->e_phnum > bfd_get_file_size (abfd)) |
791 |
goto got_no_match; |
787 |
amt = (bfd_size_type) i_ehdrp->e_phnum * sizeof (*i_phdr); |
792 |
amt = (bfd_size_type) i_ehdrp->e_phnum * sizeof (*i_phdr); |
788 |
elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); |
793 |
elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt); |
789 |
if (elf_tdata (abfd)->phdr == NULL) |
794 |
if (elf_tdata (abfd)->phdr == NULL) |
790 |
- |
|
|