summaryrefslogtreecommitdiff
path: root/core/src
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-10-19 13:55:51 -0700
committerLei Zhang <thestig@chromium.org>2015-10-19 13:55:51 -0700
commit50784b617126bd0bf507dec9e785fc982b87b621 (patch)
treebefe2f1bf1d7374f6307433718793359f23ecea2 /core/src
parentf312794507ee72641884e54c674910acdb04ca7e (diff)
downloadpdfium-50784b617126bd0bf507dec9e785fc982b87b621.tar.xz
Merge to M46: 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 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1401923005 . (cherry picked from commit b5cbfb4cd12b6499912367f9a1e11c666157acb8) Review URL: https://codereview.chromium.org/1417623002 .
Diffstat (limited to 'core/src')
-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 c7060bc851..a8145b9111 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -2453,9 +2453,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;