diff options
author | Alan Modra <amodra@gmail.com> | 2022-10-26 17:50:29 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-10-26 17:56:38 +1030 |
commit | f84ffabbb304853a6570656200dfbd32e732386f (patch) | |
tree | 201b0da5961815486f044632b201cca62ee19ce2 /bfd/peXXigen.c | |
parent | Correct ELF reloc size sanity check (diff) | |
download | binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.tar.gz binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.tar.bz2 binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.zip |
buffer overflow in _bfd_XX_print_ce_compressed_pdata
More fuzzed fun.
* peXXigen.c (_bfd_XX_print_ce_compressed_pdata): Use smaller of
virt_size and bfd section size as limit of function table.
Diffstat (limited to 'bfd/peXXigen.c')
-rw-r--r-- | bfd/peXXigen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index c5a7f7bf7ac..0232a63d558 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -2026,6 +2026,8 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) } start = 0; + if (stop > datasize) + stop = datasize; for (i = start; i < stop; i += onaline) { |