)]}'
{
  "commit": "6127ff63cf39471b2c7317c9861016424d3b884b",
  "tree": "19b830120ec820d876730960d6d994ba6a017302",
  "parents": [
    "655ee9ea3e6c0af57d320e84723ec3bf656cdbf7"
  ],
  "author": {
    "name": "Martin Erik Werner",
    "email": "martinerikwerner@gmail.com",
    "time": "Thu Apr 24 15:06:09 2014 +0200"
  },
  "committer": {
    "name": "Junio C Hamano",
    "email": "gitster@pobox.com",
    "time": "Thu Apr 24 13:46:13 2014 -0700"
  },
  "message": "setup: fix windows path buffer over-stepping\n\nFix a buffer over-stepping issue triggered by providing an absolute path\nthat is similar to the work tree path.\n\nabspath_part_inside_repo() may currently increment the path pointer by\noffset_1st_component() + wtlen, which is too much, since\noffset_1st_component() is a subset of wtlen.\n\nFor the *nix-style prefix \u0027/\u0027, this does (by luck) not cause any issues,\nsince offset_1st_component() is 1 and there will always be a \u0027/\u0027 or \u0027\\0\u0027\nthat can \"absorb\" this.\n\nIn the case of DOS-style prefixes though, the offset_1st_component() is\n3 and this can potentially over-step the string buffer. For example if\n\n    work_tree \u003d \"c:/r\"\n    path      \u003d \"c:/rl\"\n\nThen wtlen is 4, and incrementing the path pointer by (3 + 4) would\nend up 2 bytes outside a string buffer of length 6.\n\nSimilarly if\n\n    work_tree \u003d \"c:/r\"\n    path      \u003d \"c:/rl/d/a\"\n\nThen (since the loop starts by also incrementing the pointer one step),\nthis would mean that the function would miss checking if \"c:/rl/d\" could\nbe the work_tree, arguably this is unlikely though, since it would only\nbe possible with symlinks on windows.\n\nFix this by simply avoiding to increment by offset_1st_component() and\nwtlen at the same time.\n\nSigned-off-by: Martin Erik Werner \u003cmartinerikwerner@gmail.com\u003e\nSigned-off-by: Junio C Hamano \u003cgitster@pobox.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8295ba6bd85b54089b2d0c564007b25d563877bc",
      "old_mode": 33188,
      "old_path": "setup.c",
      "new_id": "3857b58562d8ff0ceb1adbccdd51c989d2326172",
      "new_mode": 33188,
      "new_path": "setup.c"
    }
  ]
}
