diff --git a/mailmap.c b/mailmap.c index af187a3826..c29e4e5349 100644 --- a/mailmap.c +++ b/mailmap.c @@ -80,7 +80,7 @@ int map_email(struct path_list *map, const char *email, char *name, int maxlen) free(mailbuf); if (item != NULL) { const char *realname = (const char *)item->util; - strncpy(name, realname, maxlen); + strlcpy(name, realname, maxlen); return 1; } return 0;