aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2002-09-10 23:45:26 +0000
committerMichael Snyder <msnyder@vmware.com>2002-09-10 23:45:26 +0000
commitc0219d42726ba1eae6e0c6a9f75b287530d185ec (patch)
tree342203be1698b3c70a264f417d31771f49e08a9d /gdb/buildsym.c
parent9d84ac84eff150d4eecab018ab83ba9f1072ce84 (diff)
downloadfsf-binutils-gdb-c0219d42726ba1eae6e0c6a9f75b287530d185ec.zip
fsf-binutils-gdb-c0219d42726ba1eae6e0c6a9f75b287530d185ec.tar.gz
fsf-binutils-gdb-c0219d42726ba1eae6e0c6a9f75b287530d185ec.tar.bz2
2002-09-10 Michael Snyder <msnyder@redhat.com>
* buildsym.c (finish_block): Protect against null pointer.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index b1962df..9d9b4f7 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)
{