summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-06 18:08:45 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-06 18:08:45 +0000
commit475565477e431cd2925a6192b348d142beb21b4d (patch)
treebe72fe18e8f4275c8fe542c92478860d6fff45d4 /core/fpdfapi/parser
parent1ca11be3b7a36b16663da4816c575cf0ac06ee7f (diff)
downloadpdfium-475565477e431cd2925a6192b348d142beb21b4d.tar.xz
Check for null object type in CPDF_Parser::LoadCrossRefV5().
BUG=chromium:871042 Change-Id: Id4566b29270ab738c69d46cb96fc134485d6ee2f Reviewed-on: https://pdfium-review.googlesource.com/39510 Reviewed-by: Art Snake <art-snake@yandex-team.ru> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 46973781b8..e070d2f733 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -752,6 +752,8 @@ bool CPDF_Parser::LoadCrossRefV5(FX_FILESIZE* pos, bool bMainXRef) {
const uint32_t cross_ref_stream_obj_type =
GetVarInt(entrystart, WidthArray[0]);
type = GetObjectTypeFromCrossRefStreamType(cross_ref_stream_obj_type);
+ if (type == ObjectType::kNull)
+ continue;
}
const uint32_t objnum = startnum + i;