aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/check-mailmap.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.keller@gmail.com>2025-02-21 15:47:58 -0800
committerJunio C Hamano <gitster@pobox.com>2025-02-21 18:27:16 -0800
commitbb60c5213134cda73c31940ec0fb33c361a064eb (patch)
treeee904f2746cf68a692306a19b6f88966c325f0a1 /builtin/check-mailmap.c
parente1fbebe347426ef7974dc2198f8a277b7c31c8fe (diff)
downloadgit-bb60c5213134cda73c31940ec0fb33c361a064eb.tar.gz
mailmap: fix check-mailmap with full mailmap line
I recently had reported to me a crash from a coworker using the recently added sendemail mailmap support: 3724814 Segmentation fault (core dumped) git check-mailmap "bugs@company.xx" This appears to happen because of the NULL pointer name passed into map_user(). Fix this by passing "" instead of NULL so that we have a valid pointer. Signed-off-by: Jacob Keller <jacob.keller@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-mailmap.c')
-rw-r--r--builtin/check-mailmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/check-mailmap.c b/builtin/check-mailmap.c
index df00b5ee13..be2cebe121 100644
--- a/builtin/check-mailmap.c
+++ b/builtin/check-mailmap.c
@@ -35,7 +35,7 @@ static void check_mailmap(struct string_list *mailmap, const char *contact)
mail = ident.mail_begin;
maillen = ident.mail_end - ident.mail_begin;
} else {
- name = NULL;
+ name = "";
namelen = 0;
mail = contact;
maillen = strlen(contact);