summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-10-16 10:45:01 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-10-16 10:45:01 +0800
commitb5cbfb4cd12b6499912367f9a1e11c666157acb8 (patch)
treed489c00745a1a9bc06319445c9e1342afd26b926 /core/src/fpdfapi/fpdf_parser
parent26268af2c1242dd173aea6dcbf763a36e734faf3 (diff)
downloadpdfium-b5cbfb4cd12b6499912367f9a1e11c666157acb8.tar.xz
Loosen checking on the bytes following 'stream'chromium/2540chromium/2539chromium/2538
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 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_parser')
-rw-r--r--core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp5
1 files changed, 2 insertions, 3 deletions
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;