)]}'
{
  "commit": "f03d5164f397994ee9956403d5327ce44a24b533",
  "tree": "63a95850740763f7b58fbadd53ce80994a560802",
  "parents": [
    "ddca3f5da1ea80e26cf04578e0eff4df64b871d9"
  ],
  "author": {
    "name": "Scott Bauer",
    "email": "sbauer@plzdonthack.me",
    "time": "Thu Apr 06 18:35:40 2017 -0600"
  },
  "committer": {
    "name": "android-build-team Robot",
    "email": "android-build-team-robot@google.com",
    "time": "Fri Nov 03 21:24:49 2017 +0000"
  },
  "message": "Read the correct amount of attributes\n\nbta_gattc_cache_load currently attempts to read 0xFF attributes into an\nallocation sized to num_attr attributes, which can be smaller than 0xFF.\n\nThere aren\u0027t more than num_attr bytes in correct data, but this breaks\nwith dynamic buffer overflow checking in CopperheadOS for the read\nsystem call since fread ends up calling read, which obtains the size of\nthe allocation from the malloc implementation and then aborts due to the\n(potential) overflow.\n\nThis would also fail with the default enabled _FORTIFY_SOURCE\u003d2 feature\nin the Android Open Source Project if osi_malloc was marked with the\nalloc_size attribute. The way it wraps malloc loses that information so\nfortify checks aren\u0027t done for calls like this.\n\nBug: 37160362\nChange-Id: I68bd170d5378c9d9d21cbda376083bc0b857e15c\nSigned-off-by: Scott Bauer \u003csbauer@plzdonthack.me\u003e\n[migrated to C++ file, added 0xFFFF limit and wrote commit message]\nSigned-off-by: Daniel Micay \u003cdanielmicay@gmail.com\u003e\n(cherry picked from commit 4d1470eb54592f7c9317419a2f1f83dc75cce770)\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e2c904de7c668b1486e91d214715448b29a5b6bc",
      "old_mode": 33188,
      "old_path": "bta/gatt/bta_gattc_cache.c",
      "new_id": "d283b382d55e6c0c897143ed772b96548ee5abc5",
      "new_mode": 33188,
      "new_path": "bta/gatt/bta_gattc_cache.c"
    }
  ]
}
