From c82a7c57dfaf9b0d9adc288d997515e04be8efb8 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 26 Jul 2007 18:53:51 +0000 Subject: [PATCH] 2007-07-26 Michael Snyder * syms.c (bfd_decode_symclass): Guard against NULL, since bfd_is_com_section dereferences the pointer. --- bfd/ChangeLog | 3 +++ bfd/syms.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 45545f56680..9a2ce289c2a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,8 @@ 2007-07-26 Michael Snyder + * syms.c (bfd_decode_symclass): Guard against NULL, since + bfd_is_com_section dereferences the pointer. + * srec.c (srec_scan): Check for EOF (critical because return value will be used as array index). diff --git a/bfd/syms.c b/bfd/syms.c index ea50944491f..9d425684d90 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -651,7 +651,7 @@ bfd_decode_symclass (asymbol *symbol) { char c; - if (bfd_is_com_section (symbol->section)) + if (symbol->section && bfd_is_com_section (symbol->section)) return 'C'; if (bfd_is_und_section (symbol->section)) { -- 2.30.2