aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/lz/lz_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/liblzma/lz/lz_decoder.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/lz/lz_decoder.h b/src/liblzma/lz/lz_decoder.h
index d2a77ba4..53ee1c1e 100644
--- a/src/liblzma/lz/lz_decoder.h
+++ b/src/liblzma/lz/lz_decoder.h
@@ -157,14 +157,14 @@ dict_repeat(lzma_dict *dict, uint32_t distance, uint32_t *len)
uint32_t copy_size = dict->size - copy_pos;
if (copy_size < left) {
- memcpy(dict->buf + dict->pos, dict->buf + copy_pos,
+ memmove(dict->buf + dict->pos, dict->buf + copy_pos,
copy_size);
dict->pos += copy_size;
copy_size = left - copy_size;
memcpy(dict->buf + dict->pos, dict->buf, copy_size);
dict->pos += copy_size;
} else {
- memcpy(dict->buf + dict->pos, dict->buf + copy_pos,
+ memmove(dict->buf + dict->pos, dict->buf + copy_pos,
left);
dict->pos += left;
}