aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-10-26 17:50:29 +1030
committerAlan Modra <amodra@gmail.com>2022-10-26 17:56:38 +1030
commitf84ffabbb304853a6570656200dfbd32e732386f (patch)
tree201b0da5961815486f044632b201cca62ee19ce2
parent5dcae8f603b9379ef1c5f59331987322fd4d2126 (diff)
downloadfsf-binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.zip
fsf-binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.tar.gz
fsf-binutils-gdb-f84ffabbb304853a6570656200dfbd32e732386f.tar.bz2
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.
-rw-r--r--bfd/peXXigen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c
index c5a7f7b..0232a63 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)
{