From: Nick Clifton Date: Fri, 21 Feb 2003 12:42:56 +0000 (+0000) Subject: Check for a NULL sentinel value before using it. X-Git-Tag: binutils-2_14-branchpoint~750 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=887933998adad12398f8e99bb484a894552f86f8;p=platform%2Fupstream%2Fbinutils.git Check for a NULL sentinel value before using it. --- diff --git a/gprof/ChangeLog b/gprof/ChangeLog index c1475b2..fedfb21 100644 --- a/gprof/ChangeLog +++ b/gprof/ChangeLog @@ -1,3 +1,8 @@ +2003-02-21 K Schutte + + * corefile.c (core_create_line_syms): Check for a NULL sentinel + value before using it. + 2002-12-02 Nick Clifton * configure.in (LINGUAS): Add pt_BR. diff --git a/gprof/corefile.c b/gprof/corefile.c index 4b8fa13..039fb82 100644 --- a/gprof/corefile.c +++ b/gprof/corefile.c @@ -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, "") == 0 + if (sentinel + && strcmp (sentinel->name, "") == 0 && min_vma <= sentinel->end_addr) sentinel->end_addr = min_vma - 1; sentinel = sym_lookup (&symtab, ~(bfd_vma) 0); - if (strcmp (sentinel->name, "") == 0 && max_vma >= sentinel->addr) + if (sentinel + && strcmp (sentinel->name, "") == 0 + && max_vma >= sentinel->addr) sentinel->addr = max_vma + 1; /* Copy in function symbols. */