]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Check for a NULL sentinel value before using it.
authorNick Clifton <nickc@redhat.com>
Fri, 21 Feb 2003 12:42:56 +0000 (12:42 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 21 Feb 2003 12:42:56 +0000 (12:42 +0000)
gprof/ChangeLog
gprof/corefile.c

index c1475b273aef8b98919fa63e6ba15e4743684cdc..fedfb21c47ddeb0af183b7b762b267aecaf6d473 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-21  K Schutte  <schutte@fel.tno.nl>
+
+       * corefile.c (core_create_line_syms): Check for a NULL sentinel
+       value before using it.
+
 2002-12-02  Nick Clifton  <nickc@redhat.com>
 
        * configure.in (LINGUAS): Add pt_BR.
index 4b8fa134003b0e715eacb63e1f92e0d8df7eaf06..039fb82adc6a627af467f42959eee4917b92a024 100644 (file)
@@ -1,6 +1,6 @@
 /* corefile.c
 
-   Copyright 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -736,13 +736,16 @@ core_create_line_syms (cbfd)
   /* Update sentinels.  */
   sentinel = sym_lookup (&symtab, (bfd_vma) 0);
 
-  if (strcmp (sentinel->name, "<locore>") == 0
+  if (sentinel
+      && strcmp (sentinel->name, "<locore>") == 0
       && min_vma <= sentinel->end_addr)
     sentinel->end_addr = min_vma - 1;
 
   sentinel = sym_lookup (&symtab, ~(bfd_vma) 0);
 
-  if (strcmp (sentinel->name, "<hicore>") == 0 && max_vma >= sentinel->addr)
+  if (sentinel
+      && strcmp (sentinel->name, "<hicore>") == 0
+      && max_vma >= sentinel->addr)
     sentinel->addr = max_vma + 1;
 
   /* Copy in function symbols.  */