diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-02 19:33:26 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-11-02 19:33:26 +0000 |
commit | 783d88793afe4b4e42460c139ab742fbd26f39f7 (patch) | |
tree | afcc9b9f639adf395f3c1cfaf66d82582947df94 /lib/Object | |
parent | c8a55a660e93bb7a4854969b4c5814bf7bb0101b (diff) |
object/COFF: Properly initalize uses of DataRefImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Object')
-rw-r--r-- | lib/Object/COFFObjectFile.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index f19836b718..7de51a43f3 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -284,6 +284,7 @@ error_code COFFObjectFile::getSymbolSection(DataRefImpl Symb, const coff_section *sec; if (error_code ec = getSection(symb->SectionNumber, sec)) return ec; DataRefImpl Sec; + std::memset(&Sec, 0, sizeof(Sec)); Sec.p = reinterpret_cast<uintptr_t>(sec); Result = section_iterator(SectionRef(Sec, this)); } @@ -618,6 +619,7 @@ error_code COFFObjectFile::getRelocationSymbol(DataRefImpl Rel, SymbolRef &Res) const { const coff_relocation* R = toRel(Rel); DataRefImpl Symb; + std::memset(&Symb, 0, sizeof(Symb)); Symb.p = reinterpret_cast<uintptr_t>(SymbolTable + R->SymbolTableIndex); Res = SymbolRef(Symb, this); return object_error::success; |