summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a07157a)
raw | patch | inline | side by side (parent: a07157a)
author | Alex Riesen <raa.lkml@gmail.com> | |
Mon, 30 Apr 2007 22:22:53 +0000 (00:22 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 30 Apr 2007 23:57:47 +0000 (16:57 -0700) |
strncpy does not NUL-terminate output in case of output buffer too short,
and map_email prototype (and usage) does not allow for figuring out
what the length of the name is.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
and map_email prototype (and usage) does not allow for figuring out
what the length of the name is.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
mailmap.c | patch | blob | history |
diff --git a/mailmap.c b/mailmap.c
index af187a38268b7e385885b3d990a99e6de9f569ba..c29e4e534925d250007507b3259855213b9500cc 100644 (file)
--- a/mailmap.c
+++ b/mailmap.c
free(mailbuf);
if (item != NULL) {
const char *realname = (const char *)item->util;
- strncpy(name, realname, maxlen);
+ strlcpy(name, realname, maxlen);
return 1;
}
return 0;