From fc456a2fa763165453a6a46bbcd030d348b0820b Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Tue, 10 Dec 2019 20:23:38 -0800 Subject: Replace strncpy with memcpy Fixes compiler warnings. --- src/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common.c') diff --git a/src/common.c b/src/common.c index a54ae6f..cc275f0 100644 --- a/src/common.c +++ b/src/common.c @@ -444,7 +444,7 @@ char *get_temp_filename(const char *prefix) } lp = strlen(prefix); result = malloc(lt + lp + 8); - strncpy(result, tmpdir, lt); + memcpy(result, tmpdir, lt); #ifdef WIN32 if (tmpdir[lt-1] != '/' && tmpdir[lt-1] != '\\') result[lt++] = '\\'; #else -- cgit v1.1-32-gdbae