Merge branch 'js/realpath-pathdup-fix'
Git v2.12 was shipped with an embarrassing breakage where various operations that verify paths given from the user stopped dying when seeing an issue, and instead later triggering segfault. * js/realpath-pathdup-fix: real_pathdup(): fix callsites that wanted it to die on error t1501: demonstrate NULL pointer access with invalid GIT_WORK_TREE
This commit is contained in:
@ -255,7 +255,7 @@ struct worktree *find_worktree(struct worktree **list,
|
||||
return wt;
|
||||
|
||||
arg = prefix_filename(prefix, strlen(prefix), arg);
|
||||
path = real_pathdup(arg);
|
||||
path = real_pathdup(arg, 1);
|
||||
for (; *list; list++)
|
||||
if (!fspathcmp(path, real_path((*list)->path)))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user