aboutsummaryrefslogtreecommitdiff
path: root/bfd/libieee.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-06-19 14:06:53 +0100
committerNick Clifton <nickc@redhat.com>2017-06-19 14:06:53 +0100
commitacb56a83016611bcb5f0a32368fddc8c213f7dd0 (patch)
tree15775f42f8fd3c86216078c424f834052c8450b8 /bfd/libieee.h
parent80053e466b3a8055334b9be9bac7d99e0d617cbe (diff)
downloadgdb-acb56a83016611bcb5f0a32368fddc8c213f7dd0.zip
gdb-acb56a83016611bcb5f0a32368fddc8c213f7dd0.tar.gz
gdb-acb56a83016611bcb5f0a32368fddc8c213f7dd0.tar.bz2
Fix access violation when parsing a corrupt IEEE binary.
PR binutils/21612 * libieee.h (struct common_header_type): Add end_p field. * ieee.c (this_byte_and_next): Do not advance input_p beyond end_p. (read_id): Check for a length that exceeds the remaining bytes in the input buffer. (ieee_seek): Initialise end_p. (ieee_archive_p): Likewise. (ieee_object_p): Likewise.
Diffstat (limited to 'bfd/libieee.h')
-rw-r--r--bfd/libieee.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/bfd/libieee.h b/bfd/libieee.h
index ace4ed3..8a07248 100644
--- a/bfd/libieee.h
+++ b/bfd/libieee.h
@@ -64,6 +64,7 @@ typedef struct ieee_per_section
typedef struct {
unsigned char *input_p;
+ unsigned char *end_p;
unsigned char *first_byte;
unsigned char *last_byte;
bfd_size_type total_amt;