)]}' { "commit": "fd6cae41bd7d5d255dc2fb96004a8bf74ac9d972", "tree": "8fed4e5168e96ad8f5cbd7aa014b4b1a2dfc5673", "parents": [ "2f71761a90bdccdb5f4a99e8b231c96aba0967d9" ], "author": { "name": "Evangelos Foutras", "email": "evangelos@foutrelis.com", "time": "Wed May 25 00:06:11 2022 +0300" }, "committer": { "name": "Commit Bot", "email": "commit-bot@chromium.org", "time": "Wed Jun 08 12:15:59 2022 +0000" }, "message": "Avoid out-of-bounds string indexing\n\nIn GetSubBuildDirAsOutputFile(), when the source directory is the same\nas the build directory, an out-of-bounds string index is used and thus\ntriggers an assertion in libstdc++. Fix this by checking if the source\ndirectory is longer than the build directory before using the latter\u0027s\nlength as the index.\n\nBug: 293\nFixes: fd9f2036f26d (\"Fix output directories for generated source\n files.\")\nChange-Id: I0b0756a01f181fb14f4bd97b45e1f441be3c0e8b\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/14080\nReviewed-by: Sylvain Defresne \u003csdefresne@chromium.org\u003e\nCommit-Queue: Sylvain Defresne \u003csdefresne@chromium.org\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "7a7078edd800ef8a7c31bdad45a08bafd280044c", "old_mode": 33188, "old_path": "src/gn/filesystem_utils.cc", "new_id": "0f984a7ea6628ec4d9ce798ef58a9519bba5655f", "new_mode": 33188, "new_path": "src/gn/filesystem_utils.cc" } ] }