aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>1999-08-09 17:16:23 +0000
committerNick Clifton <nickc@redhat.com>1999-08-09 17:16:23 +0000
commita3f779dbea39eb8d831ba6402b840793cfb79c87 (patch)
tree5037df97c3260bb9bb1e1bed97ea440a21632d30 /binutils/readelf.c
parent840a9995b31c15a5bcac8f1753690d20535036cd (diff)
downloadfsf-binutils-gdb-a3f779dbea39eb8d831ba6402b840793cfb79c87.zip
fsf-binutils-gdb-a3f779dbea39eb8d831ba6402b840793cfb79c87.tar.gz
fsf-binutils-gdb-a3f779dbea39eb8d831ba6402b840793cfb79c87.tar.bz2
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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 266db75..678c8f3 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;