summaryrefslogtreecommitdiff
path: root/environment.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-12 23:21:33 -0700
committerJunio C Hamano <gitster@pobox.com>2017-03-12 23:21:33 -0700
commitba37c92df905a5bc51efe76e32f0e67c4ad5acbe (patch)
treea01300f6b0ae623259f04aa38cca91f6f5f81047 /environment.c
parentfb070d2f17b0619cbc1be0606fd452b2294abb8d (diff)
parentce83eadd9a2c63db6263df91933da1b1b865d26a (diff)
downloadgit-ba37c92df905a5bc51efe76e32f0e67c4ad5acbe.tar.gz
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
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/environment.c b/environment.c
index c07fb17fb7..42dc3106d2 100644
--- a/environment.c
+++ b/environment.c
@@ -259,7 +259,7 @@ void set_git_work_tree(const char *new_work_tree)
return;
}
git_work_tree_initialized = 1;
- work_tree = real_pathdup(new_work_tree);
+ work_tree = real_pathdup(new_work_tree, 1);
}
const char *get_git_work_tree(void)