diff options
author | Timo Teräs <timo.teras@iki.fi> | 2015-04-08 16:58:20 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2015-04-08 16:58:20 +0300 |
commit | 60dd5798c90f0032b5c477bd35a2e0d49c280c7c (patch) | |
tree | e9ae0e9de9a3b6dbbf4092809b744b3221a85f4c /src | |
parent | 29bb67e01ee468c556ffa807fe3c8e43df2797e2 (diff) | |
download | apk-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')
-rw-r--r-- | src/io.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |