diff options
author | L. Simon <l.simon@samsung.com> | 2018-08-21 15:37:06 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-08-21 15:37:06 +0100 |
commit | 66b09c7ea97ffa4e0a175393fa7a8f240b00fbde (patch) | |
tree | 99d7fc2806ad3c2bff44379cca6f2af145f2c29e /binutils/readelf.c | |
parent | 9dcbfff1e02778bac6fb723640724c38001a8f0a (diff) | |
download | gdb-66b09c7ea97ffa4e0a175393fa7a8f240b00fbde.zip gdb-66b09c7ea97ffa4e0a175393fa7a8f240b00fbde.tar.gz gdb-66b09c7ea97ffa4e0a175393fa7a8f240b00fbde.tar.bz2 |
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.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |