)]}'
{
  "commit": "0233af4f241c712b41a5d5dfc337cdfce8c63bc9",
  "tree": "ec353562109786de34b60362bccfd4d76435cdfe",
  "parents": [
    "2486456feae06bd0dd2254f1569cf2cfb8d04104"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "thestig@chromium.org",
    "time": "Thu Oct 18 17:46:52 2018 +0000"
  },
  "committer": {
    "name": "Chromium commit bot",
    "email": "commit-bot@chromium.org",
    "time": "Thu Oct 18 17:46:52 2018 +0000"
  },
  "message": "Push/pop the graphics state stack when flattening.\n\nWhen FPDFPage_Flatten() manipulates a content stream, it replaces the\ncontent stream with a content stream array. The first element in the\narray is the original content stream and the second element in the array\nis the flattened annotations content. To make sure the original content\nstream\u0027s graphics state stack does not affect the flattened annotations,\nFPDFPage_Flatten() rewrites the original content stream to be:\n\nq\n$contents\nQ\n\nWhen FPDFPage_Flatten() manipulates a content stream array, it just\nappends the flattened annotations as a new element in the array. This\nmay result in graphics state stack leaking out.\n\nTo fix this, wrap the content stream array to be:\n\n[\"q\", $content1, ..., $contentN, \"Q\"]\n\nAnd then append the flattened annotations.\n\nBUG\u003dchromium:896366\n\nChange-Id: Ic6499e39eb4c9f1fe45d037622bf02be724b6cae\nReviewed-on: https://pdfium-review.googlesource.com/c/44252\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "98529c53c8ac1b0ef80839d74e29fe0596526c74",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_flatten.cpp",
      "new_id": "0cee611144ac503c1e9cdcdd03a0b97ed59337c8",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_flatten.cpp"
    },
    {
      "type": "modify",
      "old_id": "c861d75711f0e0b28ae396ad3cd80c4dc17c44c0",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_flatten_embeddertest.cpp",
      "new_id": "450c30c730c2edb209803ae5cf0d4f084cc8e7ce",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_flatten_embeddertest.cpp"
    },
    {
      "type": "modify",
      "old_id": "ea55ac652f0c14ca2fa6f7eaf3a88905d62e1590",
      "old_mode": 33188,
      "old_path": "testing/resources/bug_890322.in",
      "new_id": "0c6877565714841bd210e1773b89cc70de907719",
      "new_mode": 33188,
      "new_path": "testing/resources/bug_890322.in"
    },
    {
      "type": "modify",
      "old_id": "2183aafeef45b46fa850c997646fdf964fa071cf",
      "old_mode": 33188,
      "old_path": "testing/resources/bug_890322.pdf",
      "new_id": "2900c1bedc97bee71f4575b739b7af15e31f4c05",
      "new_mode": 33188,
      "new_path": "testing/resources/bug_890322.pdf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "86bd6fee32be38d8fa4f54ebed67b8e3cb36a22d",
      "new_mode": 33188,
      "new_path": "testing/resources/bug_896366.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "0310fb95c48cf91ab66f009ebf1c498ec70edd05",
      "new_mode": 33188,
      "new_path": "testing/resources/bug_896366.pdf"
    }
  ]
}
