From c0219d42726ba1eae6e0c6a9f75b287530d185ec Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 10 Sep 2002 23:45:26 +0000 Subject: [PATCH] 2002-09-10 Michael Snyder * buildsym.c (finish_block): Protect against null pointer. --- gdb/ChangeLog | 4 ++++ gdb/buildsym.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d832ac6f123..c69cf219df1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2002-09-10 Michael Snyder + + * buildsym.c (finish_block): Protect against null pointer. + 2002-09-10 Andrew Cagney * infcmd.c (default_print_registers_info): Send all output to diff --git a/gdb/buildsym.c b/gdb/buildsym.c index b1962dffeae..9d9b4f74482 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -422,7 +422,9 @@ finish_block (struct symbol *symbol, struct pending **listhead, start of this scope that don't have superblocks yet. */ opblock = NULL; - for (pblock = pending_blocks; pblock != old_blocks; pblock = pblock->next) + for (pblock = pending_blocks; + pblock && pblock != old_blocks; + pblock = pblock->next) { if (BLOCK_SUPERBLOCK (pblock->block) == NULL) { -- 2.30.2