Implement safe_strncpy() as strlcpy() and use it more.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:

committed by
Junio C Hamano

parent
5996ca0836
commit
bfbd0bb6ec
@ -112,7 +112,7 @@ static void reopen_stdout(struct commit *commit, int nr, int keep_subject)
|
||||
int len = 0;
|
||||
|
||||
if (output_directory) {
|
||||
strncpy(filename, output_directory, 1010);
|
||||
safe_strncpy(filename, output_directory, 1010);
|
||||
len = strlen(filename);
|
||||
if (filename[len - 1] != '/')
|
||||
filename[len++] = '/';
|
||||
|
Reference in New Issue
Block a user