aboutsummaryrefslogtreecommitdiff
path: root/bfd/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-02-26 17:02:38 +1030
committerAlan Modra <amodra@gmail.com>2020-02-26 20:51:33 +1030
commit02f7e7eed956b99ab2e80f8974fbe59e1d9b0dff (patch)
treebbf2050990524db353f484d2f8499d7d8252c6c9 /bfd/ChangeLog
parentcc4c4f40a2b46e355684e450f59154cece591c39 (diff)
downloadgdb-02f7e7eed956b99ab2e80f8974fbe59e1d9b0dff.zip
gdb-02f7e7eed956b99ab2e80f8974fbe59e1d9b0dff.tar.gz
gdb-02f7e7eed956b99ab2e80f8974fbe59e1d9b0dff.tar.bz2
Archive sanity checks
Adds some sanity checking to size values read from file. * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and bfd_set_error on failing test. Don't bother changing bfd_error on file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE. Check sym name is within string buffer. Use size_t for some vars. (do_slurp_coff_armap): Use size_t for some variables, fix size of int_buf. Don't change bfd_error on file read error. Use _bfd_mul_overflow when calculating carsym buffer size. Reorder calculations to catch overflows before they occur. malloc and free raw armap rather than using bfd_alloc. Read raw armap before allocating carsym+strings buffer. (_bfd_slurp_extended_name_table): Localize variables. Check name size against file size.
Diffstat (limited to 'bfd/ChangeLog')
-rw-r--r--bfd/ChangeLog15
1 files changed, 15 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0847dd5..f0b7a4a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,20 @@
2020-02-26 Alan Modra <amodra@gmail.com>
+ * archive.c (do_slurp_bsd_armap): Increase minimum parsed_size, and
+ bfd_set_error on failing test. Don't bother changing bfd_error on
+ file read error. Check symdef_count is multiple of BSD_SYMDEF_SIZE.
+ Check sym name is within string buffer. Use size_t for some vars.
+ (do_slurp_coff_armap): Use size_t for some variables, fix size of
+ int_buf. Don't change bfd_error on file read error. Use
+ _bfd_mul_overflow when calculating carsym buffer size. Reorder
+ calculations to catch overflows before they occur. malloc and
+ free raw armap rather than using bfd_alloc. Read raw armap before
+ allocating carsym+strings buffer.
+ (_bfd_slurp_extended_name_table): Localize variables. Check
+ name size against file size.
+
+2020-02-26 Alan Modra <amodra@gmail.com>
+
* vms-lib.c (vms_lib_read_index): Release correct buffer.
2020-02-26 Alan Modra <amodra@gmail.com>