]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'js/realpath-pathdup-fix' into maint
authorJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 20:56:43 +0000 (13:56 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 16 Mar 2017 20:57:00 +0000 (13:57 -0700)
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.
... and then to down to 'maint'.

* 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

1  2 
transport.c

diff --cc transport.c
index d72e0894840fc384d67339b549a9a6bce7ba03ec,d72e0894840fc384d67339b549a9a6bce7ba03ec..b6c5652d6cb5eb9b0c1d3ed80ad5034ce7f9b5dc
@@@ -1221,7 -1221,7 +1221,7 @@@ static int refs_from_alternate_cb(struc
        const struct ref *extra;
        struct alternate_refs_data *cb = data;
  
--      other = real_pathdup(e->path);
++      other = real_pathdup(e->path, 1);
        len = strlen(other);
  
        while (other[len-1] == '/')