diff options
author | Nick Clifton <nickc@redhat.com> | 2017-06-21 15:21:11 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-06-21 15:21:11 +0100 |
commit | 7adc0a8174f1233f6d92edd0671c18c9870e64e7 (patch) | |
tree | 52842fd9aad3ec3b8df8f5b3b9bac8b1839361cd /bfd/vms.h | |
parent | 3d030cdb4a8d338c87e48b249338a4870fdcd322 (diff) | |
download | gdb-7adc0a8174f1233f6d92edd0671c18c9870e64e7.zip gdb-7adc0a8174f1233f6d92edd0671c18c9870e64e7.tar.gz gdb-7adc0a8174f1233f6d92edd0671c18c9870e64e7.tar.bz2 |
Fix address violation parsing a corrupt Alpha VMS binary file.
PR binutils/21639
* vms-misc.c (_bfd_vms_save_sized_string): Use unsigned int as
type of the size parameter.
(_bfd_vms_save_counted_string): Add second parameter - the maximum
length of the counted string.
* vms.h (_bfd_vms_save_sized_string): Update prototype.
(_bfd_vms_save_counted_string): Likewise.
* vms-alpha.c (_bfd_vms_slurp_eisd): Update calls to
_bfd_vms_save_counted_string.
(_bfd_vms_slurp_ehdr): Likewise.
(_bfd_vms_slurp_egsd): Likewise.
(Parse_module): Likewise.
Diffstat (limited to 'bfd/vms.h')
-rw-r--r-- | bfd/vms.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -118,8 +118,8 @@ extern void vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *l extern void vms_get_time (unsigned int *hi, unsigned int *lo); extern void vms_raw_get_time (unsigned char *buf); -extern char * _bfd_vms_save_sized_string (unsigned char *, int); -extern char * _bfd_vms_save_counted_string (unsigned char *); +extern char * _bfd_vms_save_sized_string (unsigned char *, unsigned); +extern char * _bfd_vms_save_counted_string (unsigned char *, unsigned); extern void _bfd_vms_output_begin (struct vms_rec_wr *, int); extern void _bfd_vms_output_alignment (struct vms_rec_wr *, int); extern void _bfd_vms_output_begin_subrec (struct vms_rec_wr *, int); |