)]}'
{
  "commit": "ad9eee1628aa4dac2ac3528cb6bb5ddf27e73560",
  "tree": "837d0737ba03a96f871d9967c593414842517b3b",
  "parents": [
    "be7006adaca67fd611e59985da6532e431a4c47f"
  ],
  "author": {
    "name": "David Benjamin",
    "email": "davidben@google.com",
    "time": "Tue Apr 09 20:17:30 2019 -0500"
  },
  "committer": {
    "name": "Adam Langley",
    "email": "agl@google.com",
    "time": "Wed Apr 10 22:12:42 2019 +0000"
  },
  "message": "Handle CBB_cleanup on child CBBs more gracefully.\n\nChild and root CBBs share a type, but are different kinds of things. C++\nprogrammers sometimes mistakenly believe they should use ScopedCBB for\neverything. This mostly works because we NULL cbb-\u003echild-\u003ebase on flush,\nmaking CBB_cleanup a no-op. This zeroing also skips the assert in\nCBB_cleanup. (If we ran it unconditionally, CBB_zero + CBB_cleanup would\nnot work.)\n\nHowever, if a CBB operation fails and a function returns early, the\nchild CBB is not cleared. ScopedCBB will then call CBB_cleanup which\ntrips the assert but, in release build, misbehaves.\n\nRun the assert unconditionally and, when the assert fails, still behave\nwell. To make this work with CBB_zero, negate is_top_level to is_child,\nso a flushed child CBB and a (presumably) root CBB in the zero state are\ndistinguishable.\n\nUpdate-Note: Code that was using CBB wrong may trip an assert in debug builds.\nChange-Id: Ifea7759e1d0331f2e727c59bbafa355d70fb9dba\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/35524\nReviewed-by: Adam Langley \u003cagl@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "7998a48e14bc27e7c17b3ac7c65f6e89c39c751e",
      "old_mode": 33188,
      "old_path": "crypto/bytestring/cbb.c",
      "new_id": "1ddc73c66546f9224232659f427af588cac32d50",
      "new_mode": 33188,
      "new_path": "crypto/bytestring/cbb.c"
    },
    {
      "type": "modify",
      "old_id": "75b843411dc46b37d27b53fff6483dc4eadfd93a",
      "old_mode": 33188,
      "old_path": "include/openssl/bytestring.h",
      "new_id": "029c2be27d23339c49bcb7f3dfb55a5737b18a28",
      "new_mode": 33188,
      "new_path": "include/openssl/bytestring.h"
    }
  ]
}
