)]}'
{
  "commit": "b4bfa3e73ec68e8150701a148a185230bc2b7487",
  "tree": "0803958d6415fc073d4083f99cb37bf9f3074b45",
  "parents": [
    "ca6bf8d3ec8e8d1129041a11c4303cbbb73f6ec7"
  ],
  "author": {
    "name": "Lau Ching Jun",
    "email": "chingjun@google.com",
    "time": "Fri Jun 12 12:04:24 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jun 12 19:04:24 2026 +0000"
  },
  "message": "Fix std::vector out-of-bounds access in Flutter Android JNI and Delegate (#187218)\n\nThis CL addresses potential `std::vector` index out-of-bounds errors in\nthe Flutter engine\u0027s Android native code, detected by libc++ hardening\n(go/cc-hardening-assertions). The issues stem from unsafe `\u0026vector[0]`\naccesses on potentially empty vectors.\n\n1. **platform_view_android_jni_impl.cc (SetViewportMetrics):** Added\nsize checks before using `GetIntArrayRegion` on vectors created from JNI\narrays, which can be empty.\n2. **platform_view_android_delegate.cc (UpdateSemantics):** Moved buffer\npointer initializations (e.g., `\u0026buffer[0]`) and their usage to be\nwithin `!empty()` checks, preventing access on zero-sized vectors.\n\nThese changes ensure safe vector handling, particularly when empty data\nis passed via JNI.\n\nSee cl/922343981",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b774ee0359c4c5649a9bfa0350f2fadf5663bbaa",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/android/jni/mock_jni_env.h",
      "new_id": "69a597802d8419886923bbb88618a62b7d707a6e",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/android/jni/mock_jni_env.h"
    },
    {
      "type": "modify",
      "old_id": "347158c21e42e0f49c914b8ca951d67f5434ebb6",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc",
      "new_id": "b136d31130a2cf2490685d10f161648291418f40",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate.cc"
    },
    {
      "type": "modify",
      "old_id": "7b6ae3159d951c8f6954692264a2d07c20b5a979",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate_unittests.cc",
      "new_id": "47b7a36c4e5be45b19c93891cf95c3fbf963531a",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate_unittests.cc"
    },
    {
      "type": "modify",
      "old_id": "922d2ce88d884a0eca2057ec507460687043abcc",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/android/platform_view_android_jni_impl.cc",
      "new_id": "1c9964a714740405a73053c5c592e56dcecb1992",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/android/platform_view_android_jni_impl.cc"
    },
    {
      "type": "modify",
      "old_id": "02f784a8964a8bb4531952ba008e29b60c04a286",
      "old_mode": 33188,
      "old_path": "engine/src/flutter/shell/platform/android/platform_view_android_jni_impl_unittests.cc",
      "new_id": "076ac9fde13bf57d9eb847e0dbaf15fafa036334",
      "new_mode": 33188,
      "new_path": "engine/src/flutter/shell/platform/android/platform_view_android_jni_impl_unittests.cc"
    }
  ]
}
