Early object closing in PDF via premature 'endobj' keyword
authorJUN FANG <jun_fang@foxitsoftware.com>
Thu, 6 Aug 2015 00:07:07 +0000 (17:07 -0700)
committerJUN FANG <jun_fang@foxitsoftware.com>
Thu, 6 Aug 2015 00:07:07 +0000 (17:07 -0700)
commit2526930205ca2ef0a06ec32644d41d4548d45d80
treef1ef039fa1242b200e0e9028753f92615b4a7367
parent8d8a99027d38e3b8d452e7ab8049c310b90e780d
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
core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp