forked from Imagelibrary/binutils-gdb
* mach-o.c (bfd_mach_o_archive_p): Restrict the number of
architectures in the archive.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-01-27 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
* mach-o.c (bfd_mach_o_archive_p): Restrict the number of
|
||||||
|
architectures in the archive.
|
||||||
|
|
||||||
2009-01-27 Hans-Peter Nilsson <hp@axis.com>
|
2009-01-27 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
|
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_DTPREL>
|
||||||
|
|||||||
@@ -2098,6 +2098,11 @@ bfd_mach_o_archive_p (bfd *abfd)
|
|||||||
adata->nfat_arch = bfd_getb32 (buf + 4);
|
adata->nfat_arch = bfd_getb32 (buf + 4);
|
||||||
if (adata->magic != 0xcafebabe)
|
if (adata->magic != 0xcafebabe)
|
||||||
goto error;
|
goto error;
|
||||||
|
/* Avoid matching Java bytecode files, which have the same magic number.
|
||||||
|
In the Java bytecode file format this field contains the JVM version,
|
||||||
|
which starts at 43.0. */
|
||||||
|
if (adata->nfat_arch > 30)
|
||||||
|
goto error;
|
||||||
|
|
||||||
adata->archentries =
|
adata->archentries =
|
||||||
bfd_alloc (abfd, adata->nfat_arch * sizeof (mach_o_fat_archentry));
|
bfd_alloc (abfd, adata->nfat_arch * sizeof (mach_o_fat_archentry));
|
||||||
|
|||||||
Reference in New Issue
Block a user