)]}'
{
  "commit": "bdca62630badbffd82cdc719a3e1976ae547de63",
  "tree": "6df9396c4092760f15e50dbc74cdf6ac30ac79cb",
  "parents": [
    "12e6b20af2485dd5b250425b265e76ba54a6d9d8"
  ],
  "author": {
    "name": "bnc",
    "email": "bnc@google.com",
    "time": "Mon May 16 14:44:55 2022 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon May 16 14:47:15 2022 -0700"
  },
  "message": "Do not call memcpy with nullptr in SimpleBuffer::Read() and Write().\n\n\"If either dest or src is an invalid or null pointer, the behavior is undefined,\neven if count is zero\" according to\nhttps://en.cppreference.com/w/cpp/string/byte/memcpy.\n\nIn Write(), if `size` is positive, then Reserve() guarantees that destination\nwill never be nullptr.  If source is nullptr and `size` is zero, then the newly\nadded early return prevents the memcpy call.  If source is nullptr and `size` is\nnot zero, that is the caller\u0027s fault.\n\nIn Read(), if `bytes` is nullptr and `size` is zero, then a newly added early\nreturn prevents the memcpy call.  If `bytes` is nullptr and `size` is not zero,\nthat is the caller\u0027s fault.  If `read_ptr` is nullptr, then `read_size` will be\nzero, triggering the newly added early return path.\n\nThis is covered by existing tests in UBSAN mode, which are never actually ran in\nUBSAN mode, but will be on Envoy CI soon.\n\nPiperOrigin-RevId: 449057984\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c32f0f094f21b331cfbc50893f6b7699e7079e0b",
      "old_mode": 33188,
      "old_path": "quiche/balsa/simple_buffer.cc",
      "new_id": "756c7da9e8ea0b92a4a6d414a78eeaaafe2b6d1f",
      "new_mode": 33188,
      "new_path": "quiche/balsa/simple_buffer.cc"
    }
  ]
}
