)]}'
{
  "commit": "95ffb9277820ca73c57d7f2dada4ede5435cabc4",
  "tree": "2439dd057d5d26943c9175888d37e221f15976ca",
  "parents": [
    "cd584b1bb90267dd3bc5718dde130336ae89d7fa"
  ],
  "author": {
    "name": "Protobuf Team Bot",
    "email": "protobuf-github-bot@google.com",
    "time": "Sun Nov 08 22:13:53 2026 -0800"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Sun Nov 08 22:30:56 2026 -0800"
  },
  "message": "upb: Use a flexible array member for string field defaults.\n\nReflection stores `string` and `bytes` field defaults in `str_t`, which used the pre-C99 `char str[1]` struct hack and then wrote past index 0. Under `-fstrict-flex-arrays\u003d3` (used by hardened and sanitizer builds), the compiler and UBSan treat `str` as exactly one byte, so building a `DefPool` with any non-empty string default reports `index 4 out of bounds for type \u0027char[1]\u0027`.\n\nDeclare `str` as a C99 flexible array member. Since `sizeof(str_t)` no longer reserves a byte for `str`, both `str_t` allocations now go through one helper that sizes them with `UPB_SIZEOF_FLEX` for the data plus a null terminator and checks for overflow. Unescaped `bytes` defaults are now null-terminated too, so every `str_t` matches the comment on the struct.\n\nFixes #31323.\n\nPiperOrigin-RevId: 1017054106\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7eddab0704b5c77aaa1eace4d2ed1ed85cee5aa7",
      "old_mode": 33188,
      "old_path": "upb/reflection/field_def.c",
      "new_id": "3d2e11a46ad1b659f685f12bd9de7c38749a16e2",
      "new_mode": 33188,
      "new_path": "upb/reflection/field_def.c"
    },
    {
      "type": "modify",
      "old_id": "4ad32182a4f5f0b9233513a16726839effc4b70b",
      "old_mode": 33188,
      "old_path": "upb/reflection/reflection_test.cc",
      "new_id": "c18183901e41ab62bc816d13ff938bdb67482aaf",
      "new_mode": 33188,
      "new_path": "upb/reflection/reflection_test.cc"
    }
  ]
}
