summaryrefslogtreecommitdiff
path: root/builtin/apply.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-07-15 10:36:14 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-07-15 10:36:14 -0700
commit90360c710c4105e3bce74fc2d746c4fa48bf07e7 (patch)
tree24fd9f59b7c7eab53cb7c0f493272cb598de2724 /builtin/apply.c
parentMerge branch 'bc/http-keep-memory-given-to-curl' into maint (diff)
parentapply: carefully strdup a possibly-NULL name (diff)
downloadtgif-90360c710c4105e3bce74fc2d746c4fa48bf07e7.tar.xz
Merge branch 'tr/maint-apply-non-git-patch-parsefix' into maint
"git apply" parsed patches that add new files, generated by programs other than Git, incorrectly. This is an old breakage in v1.7.11. * tr/maint-apply-non-git-patch-parsefix: apply: carefully strdup a possibly-NULL name
Diffstat (limited to 'builtin/apply.c')
-rw-r--r--builtin/apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/apply.c b/builtin/apply.c
index 30eefc3c7b..3979f8bf3d 100644
--- a/builtin/apply.c
+++ b/builtin/apply.c
@@ -906,7 +906,7 @@ static void parse_traditional_patch(const char *first, const char *second, struc
patch->old_name = name;
} else {
patch->old_name = name;
- patch->new_name = xstrdup(name);
+ patch->new_name = null_strdup(name);
}
}
if (!name)