From feceaa596ebd1da9d8315c8ce74e45df4384da15 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 16 Oct 2018 14:39:03 +1030 Subject: [PATCH] PR23780, assertion abort in function display_raw_attribute PR 23780 * readelf.c (display_raw_attribute): Correct assertion. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d41894fa210..250108c71ee 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2018-10-16 Alan Modra + + PR 23780 + * readelf.c (display_raw_attribute): Correct assertion. + 2018-10-15 Alan Modra PR 23534 diff --git a/binutils/readelf.c b/binutils/readelf.c index 41f55ee4ede..fff50c6ad04 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -15221,7 +15221,7 @@ display_raw_attribute (unsigned char * p, unsigned char const * const end) unsigned long addr = 0; size_t bytes = end - p; - assert (end > p); + assert (end >= p); while (bytes) { int j; -- 2.30.2