[cfe-commits] r98873 - /cfe/trunk/lib/Frontend/PCHReader.cpp
Ted Kremenek
kremenek at apple.com
Thu Mar 18 14:23:06 PDT 2010
Author: kremenek
Date: Thu Mar 18 16:23:05 2010
New Revision: 98873
URL: http://llvm.org/viewvc/llvm-project?rev=98873&view=rev
Log:
Add bounds check in PCHReader. when reading source file entry record
Modified:
cfe/trunk/lib/Frontend/PCHReader.cpp
Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=98873&r1=98872&r2=98873&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReader.cpp Thu Mar 18 16:23:05 2010
@@ -902,6 +902,11 @@
return Failure;
}
+ if (Record.size() < 8) {
+ Error("source location entry is incorrect");
+ return Failure;
+ }
+
FileID FID = SourceMgr.createFileID(File,
SourceLocation::getFromRawEncoding(Record[1]),
(SrcMgr::CharacteristicKind)Record[2],
More information about the cfe-commits
mailing list