projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ede87e2
)
(osys_read_record): If record->header.lenth <= sizeof (record->header),
author
Jim Kingdon
<jkingdon@engr.sgi.com>
Fri, 3 May 1991 05:56:58 +0000
(
05:56
+0000)
committer
Jim Kingdon
<jkingdon@engr.sgi.com>
Fri, 3 May 1991 05:56:58 +0000
(
05:56
+0000)
then return rather than passing a negative (or zero) nelts to bfd_read.
bfd/oasys.c
patch
|
blob
|
history
diff --git
a/bfd/oasys.c
b/bfd/oasys.c
index 61db3838339134c68f9e19c3fab603f2acf147af..c34b09a92b124f461669f724b72b3c3c1af71934 100644
(file)
--- 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);