Implement safe_strncpy() as strlcpy() and use it more.
[git.git] / builtin-log.c
index 29a8851..5b0ea28 100644 (file)
@@ -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++] = '/';