summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/path.c b/path.c
index eb24017..a074aea 100644
--- a/path.c
+++ b/path.c
@@ -41,7 +41,7 @@ char *mksnpath(char *buf, size_t n, const char *fmt, ...)
len = vsnprintf(buf, n, fmt, args);
va_end(args);
if (len >= n) {
- snprintf(buf, n, bad_path);
+ strlcpy(buf, bad_path, n);
return buf;
}
return cleanup_path(buf);
@@ -63,7 +63,7 @@ static char *git_vsnpath(char *buf, size_t n, const char *fmt, va_list args)
goto bad;
return cleanup_path(buf);
bad:
- snprintf(buf, n, bad_path);
+ strlcpy(buf, bad_path, n);
return buf;
}