aboutsummaryrefslogtreecommitdiff
path: root/bfd/srec.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-26 18:45:13 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-26 18:45:13 +0000
commit3d7b34d85ba1babf7cf086dc6651bd1bfe0f99fc (patch)
tree8c9864b5fea8d714c48e433b71814ea9ca746f80 /bfd/srec.c
parent44c62d9e249963c9e9c0e2b658c8bf50d90237fc (diff)
downloadgdb-3d7b34d85ba1babf7cf086dc6651bd1bfe0f99fc.zip
gdb-3d7b34d85ba1babf7cf086dc6651bd1bfe0f99fc.tar.gz
gdb-3d7b34d85ba1babf7cf086dc6651bd1bfe0f99fc.tar.bz2
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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/srec.c b/bfd/srec.c
index ebb039b..371e53a 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))