mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-04 04:08:50 +08:00
Fix potential illegal memory access when parsing a corrupt PEF format file.
PR 25307 (bfd_pef_parse_function_stubs): Correct the test that ensures that there is enough data remaining in the code buffer before attempting to read a function stub.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2020-01-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 25307
|
||||||
|
(bfd_pef_parse_function_stubs): Correct the test that ensures that
|
||||||
|
there is enough data remaining in the code buffer before
|
||||||
|
attempting to read a function stub.
|
||||||
|
|
||||||
2020-01-03 Nick Clifton <nickc@redhat.com>
|
2020-01-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR 25308
|
PR 25308
|
||||||
|
@ -806,7 +806,7 @@ bfd_pef_parse_function_stubs (bfd *abfd,
|
|||||||
codepos += 4;
|
codepos += 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((codepos + 4) > codelen)
|
if ((codepos + 24) > codelen)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ret = bfd_pef_parse_function_stub (abfd, codebuf + codepos, 24, &sym_index);
|
ret = bfd_pef_parse_function_stub (abfd, codebuf + codepos, 24, &sym_index);
|
||||||
|
Reference in New Issue
Block a user