[lld] r294064 - fix nullptr dereference in COFF/Symbol.h
Bob Haarman via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 15:05:17 PST 2017
Author: inglorion
Date: Fri Feb 3 17:05:17 2017
New Revision: 294064
URL: http://llvm.org/viewvc/llvm-project?rev=294064&view=rev
Log:
fix nullptr dereference in COFF/Symbol.h
Modified:
lld/trunk/COFF/Symbols.h
Modified: lld/trunk/COFF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Symbols.h?rev=294064&r1=294063&r2=294064&view=diff
==============================================================================
--- lld/trunk/COFF/Symbols.h (original)
+++ lld/trunk/COFF/Symbols.h Fri Feb 3 17:05:17 2017
@@ -154,7 +154,7 @@ public:
bool IsExternal = false,
const coff_symbol_generic *S = nullptr,
SectionChunk *C = nullptr)
- : DefinedCOFF(DefinedRegularKind, F, N, S), Data(&C->Repl) {
+ : DefinedCOFF(DefinedRegularKind, F, N, S), Data(C ? &C->Repl : nullptr) {
this->IsExternal = IsExternal;
this->IsCOMDAT = IsCOMDAT;
}
More information about the llvm-commits
mailing list