forked from OSchip/llvm-project
Don't pass null to memcpy. Should fix the asan bots.
llvm-svn: 283336
This commit is contained in:
parent
80af0b9e3c
commit
24db10d8e1
|
@ -79,7 +79,8 @@ void StringTableBuilder::write(uint8_t *Buf) const {
|
|||
assert(isFinalized());
|
||||
for (const StringPair &P : StringIndexMap) {
|
||||
StringRef Data = P.first.val();
|
||||
memcpy(Buf + P.second, Data.data(), Data.size());
|
||||
if (!Data.empty())
|
||||
memcpy(Buf + P.second, Data.data(), Data.size());
|
||||
}
|
||||
if (K != WinCOFF)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue