diff options
author | Michael Snyder <msnyder@vmware.com> | 2007-07-26 18:45:13 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2007-07-26 18:45:13 +0000 |
commit | d2a9a8b94b3979dc2c773681c53273f320b1bdc3 (patch) | |
tree | 837698df64992d8c4558a015f6d61cd4c92008ea /bfd/srec.c | |
parent | df0bda3ce8be60327e86bfef543200a696e32e5f (diff) | |
download | binutils-redhat-d2a9a8b94b3979dc2c773681c53273f320b1bdc3.tar.gz |
2007-07-26 Michael Snyder <msnyder@access-company.com>
* srec.c (srec_scan): Check for EOF (critical because return value
will be used as array index).
Diffstat (limited to 'bfd/srec.c')
-rw-r--r-- | bfd/srec.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/srec.c b/bfd/srec.c index ebb039bba3..371e53a366 100644 --- a/bfd/srec.c +++ b/bfd/srec.c @@ -428,6 +428,11 @@ srec_scan (bfd *abfd) symval <<= 4; symval += NIBBLE (c); c = srec_get_byte (abfd, &error); + if (c == EOF) + { + srec_bad_byte (abfd, lineno, c, error); + goto error_return; + } } if (! srec_new_symbol (abfd, symname, symval)) |