diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB')
| -rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index b04ccab0cb4..65ddccaed02 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -174,6 +174,10 @@ Error PDBFile::parseFileHeaders() {      return make_error<RawError>(raw_error_code::corrupt_file,                                  "Too many directory blocks."); +  // Make sure the directory block array fits within the file. +  if (auto EC = checkOffset(BufferRef, getDirectoryBlockArray())) +    return EC; +    return Error::success();  } | 

