summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common.c2
-rw-r--r--src/ipsw.c4
2 files changed, 3 insertions, 3 deletions
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
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;
}