)]}'
{
  "commit": "d9171e504fe92277b84bb20d098d756459a871f9",
  "tree": "79f9581937b235c47fbd1a80981f36a5328f3f54",
  "parents": [
    "bc527c2b411f1f884509a8d649dfc97b534903ff"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "thestig@chromium.org",
    "time": "Wed Nov 20 17:39:49 2024 +0000"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed Nov 20 17:39:49 2024 +0000"
  },
  "message": "Fix crash in CPDF_InteractiveForm::AddTerminalField()\n\nAddTerminalField() attempts to sanitize its in-memory representation by\nmaking adjustments to the field dictionary. One such entry in the field\ndictionary is the name (/T) entry. When the /T dictionary value is a\nreference, AddTerminalField() clones it to a non-reference object,\npossibly so the object can be modified later without affecting other\nparts of the PDF that references the same object. In doing so,\nAddTerminalField() makes 2 mistakes:\n\n1) It does not check the cloned object\u0027s type. If the cloned object is a\n   stream, it cannot be stored in the dictionary. Fix this by making\n   sure the object is a string, as non-string /T values are garbage\n   values anyway.\n2) In the fallback path when cloning fails, it stores an empty name as\n   the /T value. The value should be a string instead.\n\nFix these two issues and do some style / variable name cleanup along the\nway.\n\nBug: 379844656\nChange-Id: If1afda6f49e34a32bf9f512a5ba6c5caec0c7313\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/126330\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\nReviewed-by: Thomas Sepez \u003ctsepez@google.com\u003e\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fecd51881a03c7d1ac7187efb1c87c4ac55e9437",
      "old_mode": 33188,
      "old_path": "core/fpdfdoc/BUILD.gn",
      "new_id": "0bd3ee14648e83b16117e17667bf931b5fd9e7bb",
      "new_mode": 33188,
      "new_path": "core/fpdfdoc/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "e2da3f9d3f795a4fcc4bde92238a7ddece0bc5ef",
      "old_mode": 33188,
      "old_path": "core/fpdfdoc/cpdf_interactiveform.cpp",
      "new_id": "497551ab59e093ab66b5176e078fb03748d1e583",
      "new_mode": 33188,
      "new_path": "core/fpdfdoc/cpdf_interactiveform.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "986668738441bc11a29a8bb682cb31a832cdf724",
      "new_mode": 33188,
      "new_path": "core/fpdfdoc/cpdf_interactiveform_unittest.cpp"
    }
  ]
}
