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 11:13:50 +0800
commit45e40cefa58aa0c62cfeb3e58640a7c3ba21c987 (patch)
tree8320be5c5d55c8eeb57444dfd050ccdee228df7b /core/src/fpdfapi/fpdf_parser
parentd7426de1486f6cd71235ca482b91fc44cb3b205b (diff)
downloadpdfium-45e40cefa58aa0c62cfeb3e58640a7c3ba21c987.tar.xz
Merge to XFA: 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 .
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 3fc8591690..b01c057180 100644
--- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
+++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp
@@ -2443,9 +2443,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;