)]}'
{
  "commit": "c10d17dee78d48d5e56da965e0cd02d28fd513a5",
  "tree": "7620031cebde57b95c115270bf225a5b644ad680",
  "parents": [
    "e2c30849a21d0f849e7196402c267d66551d48a3"
  ],
  "author": {
    "name": "Miklos Vajna",
    "email": "vmiklos@collabora.co.uk",
    "time": "Wed Dec 09 17:42:53 2020 +0000"
  },
  "committer": {
    "name": "Chromium commit bot",
    "email": "commit-bot@chromium.org",
    "time": "Wed Dec 09 17:42:53 2020 +0000"
  },
  "message": "FPDF_GetTrailerEnds: make this not depend on whitespace\n\nPDF-1.7 calls out no bytes other than whitespace when specifying what\ncan occur between endstream and endobj, so whitespace needs to be\nhandled. When CPDF_SyntaxParser::ReadStream() reads the stream, it reads\n\u0027endobj\u0027, and then resets the position back to the end of \u0027endstream\u0027.\nThis mechanism is disabled in case there is whitespace between the\ntokens and the newline, see the end of the function.\n\nThis results in reporting no trailer ends, as the parsing fails, as the\nnext token is expected to be \u0027endobj\u0027, but it\u0027s the ID of the next\nobject instead.\n\nFix the problem by handling whitespace in\nCPDF_SyntaxParser::ReadStream() where it was looking for \\ntoken\\n, not\nallowing whitespace between the token and the following newline.\n\nChange-Id: I7048e8d081af04af3dd08d957212c885b7982b5e\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/76850\nCommit-Queue: Tom Sepez \u003ctsepez@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "06389bccc301fa4c4efc78f71892408f81ed169f",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/parser/cpdf_syntax_parser.cpp",
      "new_id": "5318efdc178c8f4fb4f12e2c4b0975aff3bf7c93",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/parser/cpdf_syntax_parser.cpp"
    },
    {
      "type": "modify",
      "old_id": "14cfa2a10e467bad9781ff527ab28f1e60b45b23",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_view_embeddertest.cpp",
      "new_id": "f7551621e7b4a96d621428308e2b273ec720eca0",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_view_embeddertest.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0233b7507a9009557d0b4ac49004a6e076ae7442",
      "new_mode": 33188,
      "new_path": "testing/resources/trailer_end_trailing_space.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "e0ec6e4102803220743aca5af86d2419c982f6e1",
      "new_mode": 33188,
      "new_path": "testing/resources/trailer_end_trailing_space.pdf"
    }
  ]
}
