Commit 60dd5798 authored by Timo Teräs's avatar Timo Teräs

use memmove for copying buffer leftovers, as the ranges may overlap

issue cought by fortify
parent 29bb67e0
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment