diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 19:17:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-06-10 19:17:14 +0000 |
commit | db17bf38c59bc172953ed66cfe1b10c03c6bc383 (patch) | |
tree | 2712281fec99b99c2fcafd5b46439dfdd93261aa /contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp | |
parent | 686fb94a00297bf9ff49d93b948925552a2ce8e0 (diff) | |
parent | 7ab83427af0f77b59941ceba41d509d7d097b065 (diff) |
Notes
Diffstat (limited to 'contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp')
-rw-r--r-- | contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp b/contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp index 58202577672a..091ac67035dc 100644 --- a/contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp +++ b/contrib/llvm/lib/DebugInfo/PDB/Native/PublicsStream.cpp @@ -105,10 +105,12 @@ Error PublicsStream::reload() { "Could not read a thunk map.")); // Something called "section map" follows. - if (auto EC = Reader.readArray(SectionOffsets, Header->NumSections)) - return joinErrors(std::move(EC), - make_error<RawError>(raw_error_code::corrupt_file, - "Could not read a section map.")); + if (Reader.bytesRemaining() > 0) { + if (auto EC = Reader.readArray(SectionOffsets, Header->NumSections)) + return joinErrors(std::move(EC), + make_error<RawError>(raw_error_code::corrupt_file, + "Could not read a section map.")); + } if (Reader.bytesRemaining() > 0) return make_error<RawError>(raw_error_code::corrupt_file, |