(osys_read_record): If record->header.lenth <= sizeof (record->header),
then return rather than passing a negative (or zero) nelts to bfd_read.
This commit is contained in:
parent
ede87e2901
commit
6f48f7f198
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue