)]}'
{
  "commit": "0db284a42a94da8579c1491ee9756ea66dfbf75c",
  "tree": "249a0733279b8615d9fba8032b3c9958eac8f1d3",
  "parents": [
    "f87423057ed38c7a4cffc1f8399d8690d076d845"
  ],
  "author": {
    "name": "Nico Weber",
    "email": "thakis@chromium.org",
    "time": "Fri Jul 18 17:13:55 2025 -0700"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Fri Jul 18 17:13:55 2025 -0700"
  },
  "message": "Fix drawing of MMR general regions in JBIG2 images\n\nCJBig2_Context::ParseGenericRegion() calls\npage_-\u003eComposeFromWithRect() with grd_-\u003eGetReplaceRect() as rect,\nbut for MMR images, GetReplaceRect() used to always return an\nempty rect. That meant we decoded the image but then threw it away\nwhen compositing it to the JBIG2 page.\n\nTo fix, set replace_rect_ to the whole bitmap at the end of MMR\ndecoding, similar to what ProgressiveDecodeArith() does.\n\nAlso add a few spec comments to FaxG4GetRow() (which I was reading while\ndebugging this.)\n\nThe test is a hand-draw bitmap that I converted to jbig2 format using\n`jbig2` from the zip at https://www.itu.int/rec/T-REC-T.88-201808-I\n\nI ran:\n\n    jbig2 -i bitmap -f bmp \\\n          -o jbig2_mmr -F jb2 -ini jbig2-mmr.ini\n\nwith this jbig2-mmr.ini:\n\n    -Gen -Seg 1\n    -Gen -Param -Huff 1\n\nI then ran the script linked to in the bug to convert it to a\nPDF, and then manually edited it to convert it to .in format.\n(Among other things, I ran the file through `xxd` and converted\nthe stream to /ASCIIHexDecode. I compared dumps from locally-added\nhexdumping code and it looks like I didn\u0027t mess up the data.)\n\nBug: 432742364\nChange-Id: I9df6c2c233ec89c439d0c813d9b67f64c36cd951\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/134270\nCommit-Queue: Nico Weber \u003cthakis@chromium.org\u003e\nReviewed-by: Lei Zhang \u003cthestig@chromium.org\u003e\nReviewed-by: Nico Weber \u003cthakis@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c4d1a7b47de6ca084d8e25971d847e519960fad4",
      "old_mode": 33188,
      "old_path": "core/fxcodec/fax/faxmodule.cpp",
      "new_id": "f6d8c92938078517187d6c5e34be240383e0a7a9",
      "new_mode": 33188,
      "new_path": "core/fxcodec/fax/faxmodule.cpp"
    },
    {
      "type": "modify",
      "old_id": "ba5a3dad2ac7c5465a0187cf5f9f748316463f56",
      "old_mode": 33188,
      "old_path": "core/fxcodec/jbig2/JBig2_GrdProc.cpp",
      "new_id": "8d68c9fa50c25315f8d844f098039d7a4875c6d6",
      "new_mode": 33188,
      "new_path": "core/fxcodec/jbig2/JBig2_GrdProc.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2174356c1f4f03dad2577e66e606e4ba0d5f621f",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/jbig2_mmr.in"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "80cc33c4ddf5294d680eba0bd9ff5198f1d85260",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/jbig2_mmr_expected.pdf.0.png"
    }
  ]
}
