diff options
author | Nick Clifton <nickc@redhat.com> | 1999-08-09 17:16:23 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 1999-08-09 17:16:23 +0000 |
commit | 3e1c1e42e8e28b36f87baeba9342c63c4d3cec69 (patch) | |
tree | 84f19d43b98480307d00bac290ff307ac402785d /binutils/readelf.c | |
parent | f0743b5b99f97cb37951165778ca245c6cd5b116 (diff) | |
download | binutils-redhat-3e1c1e42e8e28b36f87baeba9342c63c4d3cec69.tar.gz |
Hans-Peter Nilsson <hp@bitrange.com>
* readelf.c (process_abbrev_section): Handle standard-conforming
single zero at the end of the section.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 266db75205..678c8f39a9 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -4790,8 +4790,11 @@ process_abbrev_section (start, end) entry = read_leb128 (start, & bytes_read, 0); start += bytes_read; + /* A single zero is supposed to end the section according + to the standard. If there's more, then signal that to + the caller. */ if (entry == 0) - return start; + return start == end ? NULL : start; tag = read_leb128 (start, & bytes_read, 0); start += bytes_read; |