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.
This commit is contained in:
Nick Clifton 2018-04-17 14:30:07 +01:00
parent e9301e762a
commit 6327533b1f
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2018-04-17 Nick Clifton <nickc@redhat.com>
PR 23065
* dwarf2.c (concat_filename): Check for a NULL table pointer.
2018-04-16 Nick Clifton <nickc@redhat.com>
PR 23061

View File

@ -1566,7 +1566,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)