diff options
-rw-r--r-- | bfd/oasys.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/oasys.c b/bfd/oasys.c index 61db383..c34b09a 100644 --- a/bfd/oasys.c +++ b/bfd/oasys.c @@ -40,6 +40,8 @@ DEFUN(oasys_read_record,(abfd, record), bfd_read(record, 1, sizeof(record->header), abfd); + if ((size_t) record->header.length <= (size_t) sizeof (record->header)) + return; bfd_read(((char *)record )+ sizeof(record->header), 1, record->header.length - sizeof(record->header), abfd); |