)]}'
{
  "commit": "d690c3d32e2c1be819604b27c00b296b8208f2be",
  "tree": "d8bc70efb03ff71ec4d50379dafd7e74132666aa",
  "parents": [
    "197d0d8b43177e864ce474396d2c4508631f99bd"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "thestig@chromium.org",
    "time": "Wed Dec 18 20:30:50 2019 +0000"
  },
  "committer": {
    "name": "Chromium commit bot",
    "email": "commit-bot@chromium.org",
    "time": "Wed Dec 18 20:30:50 2019 +0000"
  },
  "message": "Avoid crash in CPDF_SecurityHandler::GetUserPassword().\n\nFor r2 and r3 encrypted PDFs, the value for the /O key is normally a\n32-byte string. CPDF_SecurityHandler::GetUserPassword() recently started\nusing spans, and that caught an OOB error for /O keys shorter than\n32-bytes. While a hard crash is better than an OOB read, gracefully\nhandling the situation is best. Change GetUserPassword() to do that.\n\nFor testing, add hand-edited copies of encrypted_hello_world_r2.pdf and\nencrypted_hello_world_r3.pdf, with 31-byte /O keys, and the xref offset\nadjusted. Then make sure embedder tests that try to load these bad PDFs\ndo not crash.\n\nBug: pdfium:1436\nChange-Id: I873eead7c1dc45c9c4bbd41044f8fa5b77d7f558\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/64170\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d65ce4b9737f383009e72965371976ff7531d0a8",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/parser/cpdf_security_handler.cpp",
      "new_id": "126fc6b8a95a81fc0490f17264284b77abcc5067",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/parser/cpdf_security_handler.cpp"
    },
    {
      "type": "modify",
      "old_id": "a7a0a798c25a73a75a1eabe8efc5740e2421d83d",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp",
      "new_id": "ee2a621515dc69d63074051ffe5c9bb0aaac5405",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "637812bbda2106a777f7d328b4ba7c5fedc498e8",
      "new_mode": 33188,
      "new_path": "testing/resources/encrypted_hello_world_r2_bad_okey.pdf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "721c20b6e21c0c518a2fc7abb6866994126b6b48",
      "new_mode": 33188,
      "new_path": "testing/resources/encrypted_hello_world_r3_bad_okey.pdf"
    }
  ]
}
