summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-04-08 16:58:20 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-04-08 16:58:20 +0300
commit60dd5798c90f0032b5c477bd35a2e0d49c280c7c (patch)
treee9ae0e9de9a3b6dbbf4092809b744b3221a85f4c /src/io.c
parent29bb67e01ee468c556ffa807fe3c8e43df2797e2 (diff)
downloadapk-tools-60dd5798c90f0032b5c477bd35a2e0d49c280c7c.tar.gz
apk-tools-60dd5798c90f0032b5c477bd35a2e0d49c280c7c.tar.bz2
apk-tools-60dd5798c90f0032b5c477bd35a2e0d49c280c7c.tar.xz
apk-tools-60dd5798c90f0032b5c477bd35a2e0d49c280c7c.zip
use memmove for copying buffer leftovers, as the ranges may overlap
issue cought by fortify
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index e9d95df..765afc5 100644
--- a/src/io.c
+++ b/src/io.c
@@ -224,7 +224,7 @@ static apk_blob_t is_bs_read(void *stream, apk_blob_t token)
/* We need more data */
if (isbs->left.len != 0)
- memcpy(isbs->buffer, isbs->left.ptr, isbs->left.len);
+ memmove(isbs->buffer, isbs->left.ptr, isbs->left.len);
isbs->left.ptr = isbs->buffer;
size = isbs->is->read(isbs->is, isbs->buffer + isbs->left.len,
sizeof(isbs->buffer) - isbs->left.len);