binutils/CVE-2019-9077.patch
2019-09-30 10:32:27 -04:00

21 lines
609 B
Diff

diff --git a/binutils/readelf.c b/binutils/readelf.c
index 9439501..31fa9b1 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -13709,6 +13709,12 @@ process_mips_specific (FILE * file)
error (_("No MIPS_OPTIONS header found\n"));
return FALSE;
}
+ /* PR 24243 */
+ if (sect->sh_size < sizeof (* eopt))
+ {
+ error (_("The MIPS options section is too small.\n"));
+ return FALSE;
+ }
eopt = (Elf_External_Options *) get_data (NULL, filedata, options_offset, 1,
sect->sh_size, _("options"));
--
1.8.3.1