2007-07-25 Michael Snyder * srec.c (srec_scan): Check for EOF (critical because return value will be used as array index). Index: srec.c =================================================================== RCS file: /cvs/src/src/bfd/srec.c,v retrieving revision 1.42 diff -p -5 -r1.42 srec.c *** srec.c 3 Jul 2007 14:26:42 -0000 1.42 --- srec.c 26 Jul 2007 00:03:57 -0000 *************** srec_scan (bfd *abfd) *** 426,435 **** --- 426,440 ---- while (ISHEX (c)) { 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)) goto error_return; }