From b5cbfb4cd12b6499912367f9a1e11c666157acb8 Mon Sep 17 00:00:00 2001 From: Jun Fang Date: Fri, 16 Oct 2015 10:45:01 +0800 Subject: Loosen checking on the bytes following 'stream' PDF specs say that end of line markers shall follow the keyword "stream". But a white space before end of line markers follows this keyword in the test pdf files. BUG=543018 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1401923005 . --- core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp index a94e5bb01d..c9d4f142b5 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp @@ -2437,9 +2437,8 @@ CPDF_Stream* CPDF_SyntaxParser::ReadStream(CPDF_Dictionary* pDict, ((CPDF_Reference*)pLenObj)->GetRefObjNum() != objnum))) { len = pLenObj->GetInteger(); } - // Check whether end of line markers follow the keyword 'stream'. - // The stream starts after end of line markers. - m_Pos += ReadEOLMarkers(m_Pos); + // Locate the start of stream. + ToNextLine(); FX_FILESIZE streamStartPos = m_Pos; if (pContext) { pContext->m_DataStart = streamStartPos; -- cgit v1.2.3