diff options
author | DJ Delorie <dj@redhat.com> | 2009-05-13 21:41:38 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2009-05-13 21:41:38 +0000 |
commit | 77ca13256739ebe716de0f17d3e2ae7797d18ea5 (patch) | |
tree | a7872e86c0f6e228aec30402e3ce8db11397da7e /gas/cgen.c | |
parent | 9f1036c17f3a91b8c1eaadb16a131a37d48540ea (diff) | |
download | gdb-77ca13256739ebe716de0f17d3e2ae7797d18ea5.zip gdb-77ca13256739ebe716de0f17d3e2ae7797d18ea5.tar.gz gdb-77ca13256739ebe716de0f17d3e2ae7797d18ea5.tar.bz2 |
* cgen.c (gas_cgen_parse_operand): Guard against NULL pointers.
Diffstat (limited to 'gas/cgen.c')
-rw-r--r-- | gas/cgen.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |