)]}'
{
  "commit": "85a28fb8715e20e91ba986ae700f6b08a47438d7",
  "tree": "b15efe9d2ade2dbc58ad761ead247fdcbadd632e",
  "parents": [
    "ca54937a1707639571552b82ddc140b503d23278"
  ],
  "author": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Tue Jul 09 19:55:37 2024 +0000"
  },
  "committer": {
    "name": "luigi-rosso",
    "email": "hello@rive.app",
    "time": "Tue Jul 09 19:55:37 2024 +0000"
  },
  "message": "Fix jpeg and png decode overflows and error handling.\n\nOur png and jpeg decode methods suffer from overflow bugs caused when multiplying 32 bit dimensions that overflow 32 bits of storage. We fix this in two ways:\n- bump factors to size_t when multiplying to ensure large valid files can be decoded\n- check for overflow when passing row pointers for decoding or copying to ensure we don\u0027t access out of bounds memory\n\nAlso includes some cleanup using unique ptr in png decoding.\n\nAlso includes two tests with a bad png and a half-bad jpeg (half-bad as it can actually decode but provides incorrect/manipulated dimensions to attempt to cause overflow).\n\nIssue reported here: https://github.com/rive-app/rive-cpp/issues/373\n\nDiffs\u003d\n93fb6eb83 Fix jpeg and png decode overflows and error handling. (#7535)\n\nCo-authored-by: Luigi Rosso \u003cluigi-rosso@users.noreply.github.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "21b7f3d7ab0daa2b6aaff26aec2b05919ff3525b",
      "old_mode": 33188,
      "old_path": ".rive_head",
      "new_id": "172e250f8efee35ff5b5b03a74c1e3ea52edf758",
      "new_mode": 33188,
      "new_path": ".rive_head"
    },
    {
      "type": "modify",
      "old_id": "0eab5c786d71e0fead7f5b0f5e62898ca135a593",
      "old_mode": 33188,
      "old_path": "decoders/src/decode_jpeg.cpp",
      "new_id": "2ed8c9ae2b78e7fa09532b320c804b78d367c5f4",
      "new_mode": 33188,
      "new_path": "decoders/src/decode_jpeg.cpp"
    },
    {
      "type": "modify",
      "old_id": "edfb1bba6f16cab0212b07e6bff34a1a0cbd01c4",
      "old_mode": 33188,
      "old_path": "decoders/src/decode_png.cpp",
      "new_id": "fcf441cac8aeaf49165db40d63ae604c886d9b51",
      "new_mode": 33188,
      "new_path": "decoders/src/decode_png.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "27a5d74a021a9a05de4598ad632572dc905a2d0d",
      "new_mode": 33188,
      "new_path": "test/assets/bad.jpg"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "5392a7eff3713d00875dbecc0dcf99576cedbe84",
      "new_mode": 33188,
      "new_path": "test/assets/bad.png"
    },
    {
      "type": "modify",
      "old_id": "d9fe82752bf38e7043f50ca63704049a4c56ab4d",
      "old_mode": 33188,
      "old_path": "test/image_decoders_test.cpp",
      "new_id": "21132c27d9e21669a04e62fdc497202695c47e42",
      "new_mode": 33188,
      "new_path": "test/image_decoders_test.cpp"
    }
  ]
}
