forked from OSchip/llvm-project
Fix a ubsan failure introduced by r305092
lib/Object/WindowsResource.cpp:578:3: runtime error: store to misaligned address 0x7fa09aedebbe for type 'unsigned int', which requires 4 byte alignment 0x7fa09aedebbe: note: pointer points here 00 00 03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ llvm-svn: 305149
This commit is contained in:
parent
5806d9f205
commit
c6e9e3007b
|
@ -574,8 +574,8 @@ void WindowsResourceCOFFWriter::writeSymbolTable() {
|
|||
|
||||
void WindowsResourceCOFFWriter::writeStringTable() {
|
||||
// Just 4 null bytes for the string table.
|
||||
auto COFFStringTable = reinterpret_cast<uint32_t *>(Current);
|
||||
*COFFStringTable = 0;
|
||||
auto COFFStringTable = reinterpret_cast<void *>(Current);
|
||||
memset(COFFStringTable, 0, 4);
|
||||
}
|
||||
|
||||
void WindowsResourceCOFFWriter::writeDirectoryTree() {
|
||||
|
|
Loading…
Reference in New Issue