diff options
author | 2018-04-17 14:30:07 +0100 | |
---|---|---|
committer | 2018-12-04 23:53:17 +0100 | |
commit | 5b2ee59e0943d4a6689217edcaccd994b1a96e99 (patch) | |
tree | 33e933f9b2861c003cd19b3cfc242fc62596654c | |
parent | Fix an illegal memory access when copying a PE format file with corrupt debug... (diff) | |
download | binutils-gdb-5b2ee59e0943d4a6689217edcaccd994b1a96e99.tar.gz binutils-gdb-5b2ee59e0943d4a6689217edcaccd994b1a96e99.tar.bz2 binutils-gdb-5b2ee59e0943d4a6689217edcaccd994b1a96e99.zip |
Add a check for a NULL table pointer before attempting to compute a DWARF filename.
PR 23065
* dwarf2.c (concat_filename): Check for a NULL table pointer.
(cherry picked from commit 6327533b1fd29fa86f6bf34e61c332c010e3c689)
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
-rw-r--r-- | bfd/dwarf2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index e4f3714942d..bddae5c2952 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -1565,7 +1565,7 @@ concat_filename (struct line_info_table *table, unsigned int file) { char *filename; - if (file - 1 >= table->num_files) + if (table == NULL || file - 1 >= table->num_files) { /* FILE == 0 means unknown. */ if (file) |