Commit e52c2989 by Edward Thomson

repository: validate workdir path lengths

parent 4470e48a
......@@ -2702,9 +2702,9 @@ int git_repository_hashfile(
* now that is not possible because git_filters_load() needs it.
*/
error = git_path_join_unrooted(
&full_path, path, git_repository_workdir(repo), NULL);
if (error < 0)
if ((error = git_path_join_unrooted(
&full_path, path, git_repository_workdir(repo), NULL)) < 0 ||
(error = git_path_validate_workdir_buf(repo, &full_path)) < 0)
return error;
if (!as_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment