From 475565477e431cd2925a6192b348d142beb21b4d Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 6 Aug 2018 18:08:45 +0000 Subject: 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 Commit-Queue: Lei Zhang --- core/fpdfapi/parser/cpdf_parser.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3