diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2014-08-28 08:22:42 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2014-08-28 08:24:19 -0700 |
commit | 376c8d5bbb7e31987e363ee4c481ae8ff5015a77 (patch) | |
tree | 2b1e3062c62fbb03cf163bfa326b342eb0c629bd /bfd/srec.c | |
parent | 7096e886259fad196b955ecaff9a61891281d117 (diff) | |
download | binutils-376c8d5bbb7e31987e363ee4c481ae8ff5015a77.zip binutils-376c8d5bbb7e31987e363ee4c481ae8ff5015a77.tar.gz binutils-376c8d5bbb7e31987e363ee4c481ae8ff5015a77.tar.bz2 |
Check S-record with 0 size
* srec.c (srec_scan): Return error for 0 size.
Diffstat (limited to 'bfd/srec.c')
-rw-r--r-- | bfd/srec.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -486,7 +486,8 @@ srec_scan (bfd *abfd) bufsize = bytes * 2; } - if (bfd_bread (buf, (bfd_size_type) bytes * 2, abfd) != bytes * 2) + if (bytes == 0 + || bfd_bread (buf, (bfd_size_type) bytes * 2, abfd) != bytes * 2) goto error_return; /* Ignore the checksum byte. */ |