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/ipsw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipsw.c') diff --git a/src/ipsw.c b/src/ipsw.c index d1d858b..2920bf2 100644 --- a/src/ipsw.c +++ b/src/ipsw.c @@ -61,9 +61,9 @@ static char* build_path(const char* path, const char* file) if (!fullpath) { return NULL; } - strncpy(fullpath, path, plen); + memcpy(fullpath, path, plen); fullpath[plen] = '/'; - strncpy(fullpath+plen+1, file, flen); + memcpy(fullpath+plen+1, file, flen); fullpath[plen+1+flen] = '\0'; return fullpath; } -- cgit v1.1-32-gdbae