summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
index 6fefafe597c..be1368eb94f 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp
@@ -127,7 +127,7 @@ std::error_code PDBFile::parseFileHeaders() {
return std::make_error_code(std::errc::illegal_byte_sequence);
// We don't support blocksizes which aren't a multiple of four bytes.
- if (SB->BlockSize % sizeof(support::ulittle32_t) != 0)
+ if (SB->BlockSize == 0 || SB->BlockSize % sizeof(support::ulittle32_t) != 0)
return std::make_error_code(std::errc::not_supported);
// We don't support directories whose sizes aren't a multiple of four bytes.
OpenPOWER on IntegriCloud