[binutils-gdb] Fix a seg-fault in readelf when parsing corrupt HPPA unwind tables.
Nick Clifton
nickc@sourceware.org
Tue Aug 21 14:37:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66b09c7ea97ffa4e0a175393fa7a8f240b00fbde
commit 66b09c7ea97ffa4e0a175393fa7a8f240b00fbde
Author: L. Simon <l.simon@samsung.com>
Date: Tue Aug 21 15:37:06 2018 +0100
Fix a seg-fault in readelf when parsing corrupt HPPA unwind tables.
PR 23531
* readelf.c (hppa_process_unwind): Only dump the unwind table if
the data was successfully read in.
Diff:
---
binutils/ChangeLog | 6 ++++++
binutils/readelf.c | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 265bd68..ab7183b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2018-08-21 L. Simon <l.simon@samsung.com>
+
+ PR 23531
+ * readelf.c (hppa_process_unwind): Only dump the unwind table if
+ the data was successfully read in.
+
2018-08-18 Alan Modra <amodra@gmail.com>
* testsuite/lib/binutils-common.exp (is_elf64): Use directory of
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 8a61db6..52aebd3 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -8130,8 +8130,8 @@ hppa_process_unwind (Filedata * filedata)
if (! slurp_hppa_unwind_table (filedata, &aux, sec))
res = FALSE;
-
- if (aux.table_len > 0)
+
+ if (res && aux.table_len > 0)
{
if (! dump_hppa_unwind (filedata, &aux))
res = FALSE;
More information about the Binutils-cvs
mailing list