* [PATCH] syms.c, null ptr guard
@ 2007-07-26 1:48 msnyder
2007-07-26 13:48 ` Alan Modra
0 siblings, 1 reply; 3+ messages in thread
From: msnyder @ 2007-07-26 1:48 UTC (permalink / raw)
To: binutils
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
Unlike some of the other macros that follow it, bfd_is_com_section
will dereference the pointer. Since we check the pointer for null
later, we probably need to do so here too.
[-- Attachment #2: com.txt --]
[-- Type: text/plain, Size: 790 bytes --]
2007-07-25 Michael Snyder <msnyder@access-company.com>
* syms.c (bfd_decode_symclass): Guard against NULL, since
bfd_is_com_section dereferences the pointer.
Index: syms.c
===================================================================
RCS file: /cvs/src/src/bfd/syms.c,v
retrieving revision 1.44
diff -p -r1.44 syms.c
*** syms.c 3 Jul 2007 14:26:42 -0000 1.44
--- syms.c 26 Jul 2007 01:40:24 -0000
*************** bfd_decode_symclass (asymbol *symbol)
*** 651,657 ****
{
char c;
! if (bfd_is_com_section (symbol->section))
return 'C';
if (bfd_is_und_section (symbol->section))
{
--- 651,657 ----
{
char c;
! if (symbol->section && bfd_is_com_section (symbol->section))
return 'C';
if (bfd_is_und_section (symbol->section))
{
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] syms.c, null ptr guard
2007-07-26 1:48 [PATCH] syms.c, null ptr guard msnyder
@ 2007-07-26 13:48 ` Alan Modra
2007-07-26 19:06 ` msnyder
0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2007-07-26 13:48 UTC (permalink / raw)
To: msnyder; +Cc: binutils
On Wed, Jul 25, 2007 at 06:43:24PM -0700, msnyder@sonic.net wrote:
> * syms.c (bfd_decode_symclass): Guard against NULL, since
> bfd_is_com_section dereferences the pointer.
OK.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] syms.c, null ptr guard
2007-07-26 13:48 ` Alan Modra
@ 2007-07-26 19:06 ` msnyder
0 siblings, 0 replies; 3+ messages in thread
From: msnyder @ 2007-07-26 19:06 UTC (permalink / raw)
To: msnyder, binutils
> On Wed, Jul 25, 2007 at 06:43:24PM -0700, msnyder@sonic.net wrote:
>> * syms.c (bfd_decode_symclass): Guard against NULL, since
>> bfd_is_com_section dereferences the pointer.
>
> OK
Committed, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-26 18:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26 1:48 [PATCH] syms.c, null ptr guard msnyder
2007-07-26 13:48 ` Alan Modra
2007-07-26 19:06 ` msnyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).