From: DJ Delorie Date: Wed, 13 May 2009 21:41:38 +0000 (+0000) Subject: * cgen.c (gas_cgen_parse_operand): Guard against NULL pointers. X-Git-Tag: sid-snapshot-20090601~219 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77ca13256739ebe716de0f17d3e2ae7797d18ea5;p=thirdparty%2Fbinutils-gdb.git * cgen.c (gas_cgen_parse_operand): Guard against NULL pointers. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index c49a116f013..1c1fbb2bb4c 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2009-05-13 DJ Delorie + + * cgen.c (gas_cgen_parse_operand): Guard against NULL pointers. + 2009-05-13 Andrew Jenner * config/tc-arm.c: Move as.h to start of file. diff --git a/gas/cgen.c b/gas/cgen.c index 178402af27b..79a46f668a9 100644 --- a/gas/cgen.c +++ b/gas/cgen.c @@ -452,9 +452,10 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP) if (exp.X_op == O_symbol && reloc_type == BFD_RELOC_RELC && exp.X_add_symbol->sy_value.X_op == O_constant - && exp.X_add_symbol->bsym->section != expr_section - && exp.X_add_symbol->bsym->section != absolute_section - && exp.X_add_symbol->bsym->section != undefined_section) + && (!exp.X_add_symbol->bsym + || (exp.X_add_symbol->bsym->section != expr_section + && exp.X_add_symbol->bsym->section != absolute_section + && exp.X_add_symbol->bsym->section != undefined_section))) { /* Local labels will have been (eagerly) turned into constants by now, due to the inappropriately deep insight of the