summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNico Rieck <nico.rieck@gmail.com>2013-04-22 08:34:59 +0000
committerNico Rieck <nico.rieck@gmail.com>2013-04-22 08:34:59 +0000
commit92f5e268c9aad68ed58198ad14f4d32fd26c5db6 (patch)
treef46159e67782d9d16f236b473e70be0e000fce3e /tools
parent48831939a83915939f759bdbe95404499169bc85 (diff)
downloadexternal_llvm-92f5e268c9aad68ed58198ad14f4d32fd26c5db6.zip
external_llvm-92f5e268c9aad68ed58198ad14f4d32fd26c5db6.tar.gz
external_llvm-92f5e268c9aad68ed58198ad14f4d32fd26c5db6.tar.bz2
llvm-readobj: Check for null section pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp
index 56885c6..14f8b72 100644
--- a/tools/llvm-readobj/COFFDumper.cpp
+++ b/tools/llvm-readobj/COFFDumper.cpp
@@ -799,7 +799,7 @@ void COFFDumper::printSymbol(symbol_iterator SymI) {
W.printEnum("Selection", Aux->Selection, makeArrayRef(ImageCOMDATSelect));
W.printBinary("Unused", makeArrayRef(Aux->Unused));
- if (Section->Characteristics & COFF::IMAGE_SCN_LNK_COMDAT
+ if (Section && Section->Characteristics & COFF::IMAGE_SCN_LNK_COMDAT
&& Aux->Selection == COFF::IMAGE_COMDAT_SELECT_ASSOCIATIVE) {
const coff_section *Assoc;
StringRef AssocName;