diff options
author | Nick Clifton <nickc@redhat.com> | 2017-07-27 12:04:50 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-07-27 12:04:50 +0100 |
commit | 8bdf0be19d2777565a8b1c88347f65d6a4b8c5fc (patch) | |
tree | 3837617a722ce5ec26a0e22c0e21169f47b5af0e /bfd/vms-misc.c | |
parent | 63d4980d60dd137996fa282ae1df2e3fcb4519ee (diff) | |
download | binutils-8bdf0be19d2777565a8b1c88347f65d6a4b8c5fc.zip binutils-8bdf0be19d2777565a8b1c88347f65d6a4b8c5fc.tar.gz binutils-8bdf0be19d2777565a8b1c88347f65d6a4b8c5fc.tar.bz2 |
Fix address violation issues encountered when parsing corrupt binaries.
PR 21840
* mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
size is -1.
* nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
with error return.
* section.c (bfd_make_section_with_flags): Fail if the name or bfd
are NULL.
* vms-alpha.c (bfd_make_section_with_flags): Correct computation
of end pointer.
(evax_bfd_print_emh): Check for invalid string lengths.
Diffstat (limited to 'bfd/vms-misc.c')
-rw-r--r-- | bfd/vms-misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c index 7497f02..91e2ec7 100644 --- a/bfd/vms-misc.c +++ b/bfd/vms-misc.c @@ -135,8 +135,8 @@ _bfd_hexdump (int level, unsigned char *ptr, int size, int offset) #endif -/* Copy sized string (string with fixed size) to new allocated area - size is string size (size of record) */ +/* Copy sized string (string with fixed size) to new allocated area. + Size is string size (size of record). */ char * _bfd_vms_save_sized_string (unsigned char *str, unsigned int size) @@ -151,8 +151,8 @@ _bfd_vms_save_sized_string (unsigned char *str, unsigned int size) return newstr; } -/* Copy counted string (string with size at first byte) to new allocated area - ptr points to size byte on entry */ +/* Copy counted string (string with size at first byte) to new allocated area. + PTR points to size byte on entry. */ char * _bfd_vms_save_counted_string (unsigned char *ptr, unsigned int maxlen) |