)]}'
{
  "commit": "ea3e3215e0d0e6c986788ec931a0499ed05930b8",
  "tree": "fb621e3867db1074973f415f0cc70caf6478e3f5",
  "parents": [
    "88329b9266a34bfb78a619d7cbf678da5e293f98"
  ],
  "author": {
    "name": "Joe Downing",
    "email": "joedow@google.com",
    "time": "Fri Oct 16 16:15:21 2020"
  },
  "committer": {
    "name": "Commit Bot",
    "email": "commit-bot@chromium.org",
    "time": "Fri Oct 16 18:31:44 2020"
  },
  "message": "Fixing ASAN container-overflow error in DxgiOutputDuplicator\n\nThe DxgiOutputDuplicator uses a vector\u003cbyte\u003e to hold the rects\nthat have changed on the screen.  It then iterates over the\nvector to grab each rect and apply it to the updated_region.\n\nThere is vector resizing logic which checks the \u0027capacity\u0027 of\nthe vector and determines whether there is enough space for the\nchanged rect data.  Often the \u0027capacity\u0027 and \u0027size\u0027 of the\nvector are equal but that isn\u0027t always true.  When the capacity\nis greater than size, and the number of changed rects is high\nenough, rect data will be written past the element pointed to\nby (data() + size()) and this is the error that ASAN is warning\nof.\n\nThe fix is to use size() instead of capacity() when determining\nwhether to resize the vector and as the buffer size we provide\nto the Windows API.  There are no other usages of this vector so\nthere aren\u0027t any problems caused by the size/capacity discrepancy\nin the existing builds.  The ASAN issue is worth fixing in case\nsomeone comes along and decides to use the vector differently (e.g\nrely on the size instead of capacity so some of the rects are\nnot counted).\n\nBug: chromium:1138446\nChange-Id: I3041091423de889e0f8aabc56ece9466a3000b4f\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/188900\nReviewed-by: Jamie Walch \u003cjamiewalch@chromium.org\u003e\nCommit-Queue: Joe Downing \u003cjoedow@google.com\u003e\nCr-Commit-Position: refs/heads/master@{#32425}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c90e2f1ab537bb04465b66bb5480de4ffa27652e",
      "old_mode": 33188,
      "old_path": "modules/desktop_capture/win/dxgi_output_duplicator.cc",
      "new_id": "65a0d77667b09e3bffb356a56ad85083140afac6",
      "new_mode": 33188,
      "new_path": "modules/desktop_capture/win/dxgi_output_duplicator.cc"
    }
  ]
}
