From 2526930205ca2ef0a06ec32644d41d4548d45d80 Mon Sep 17 00:00:00 2001 From: JUN FANG Date: Wed, 5 Aug 2015 17:07:07 -0700 Subject: Early object closing in PDF via premature 'endobj' keyword Adobe acrobat defines keywords "\nendstream\n" and "\nendobj\n" in object's stream. However, Pdfium searches "endstream" and "endobj" as the keywords in the streams of objects. Some words like "(endstream)" are wrongly treated as keywords in pdfium. This fix follows Adobe's solution. BUG=493126 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1219133005 . --- core/include/fpdfapi/fpdf_parser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/include/fpdfapi/fpdf_parser.h') diff --git a/core/include/fpdfapi/fpdf_parser.h b/core/include/fpdfapi/fpdf_parser.h index 7640c857fa..cb4e15e25d 100644 --- a/core/include/fpdfapi/fpdf_parser.h +++ b/core/include/fpdfapi/fpdf_parser.h @@ -297,6 +297,8 @@ class CPDF_SyntaxParser { CFX_ByteString ReadHexString(); + unsigned int ReadEOLMarkers(FX_FILESIZE pos); + CPDF_Stream* ReadStream(CPDF_Dictionary* pDict, PARSE_CONTEXT* pContext, FX_DWORD objnum, -- cgit v1.2.3