summaryrefslogtreecommitdiffstats
path: root/lz4.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-09-10 12:00:39 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-09-10 12:00:39 (GMT)
commit0400451ac22b9578274a3971ed65e6c70cd7fdb9 (patch)
tree77d33900b431be2047db09d272e2914a8c462453 /lz4.c
parenteac83cd850d2f69a82ef9af344be9b7f3925681a (diff)
downloadlz4-0400451ac22b9578274a3971ed65e6c70cd7fdb9.zip
lz4-0400451ac22b9578274a3971ed65e6c70cd7fdb9.tar.gz
lz4-0400451ac22b9578274a3971ed65e6c70cd7fdb9.tar.bz2
Fix : streaming mode bug (re-using context & buffers)
Diffstat (limited to 'lz4.c')
-rw-r--r--lz4.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lz4.c b/lz4.c
index ecb8a79..4e2026e 100644
--- a/lz4.c
+++ b/lz4.c
@@ -855,7 +855,7 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
if ((U32)dictSize > 64 KB) dictSize = 64 KB; /* useless to define a dictionary > 64 KB */
if ((U32)dictSize > dict->dictSize) dictSize = dict->dictSize;
- memcpy(safeBuffer, previousDictEnd - dictSize, dictSize);
+ memmove(safeBuffer, previousDictEnd - dictSize, dictSize);
dict->dictionary = (const BYTE*)safeBuffer;
dict->dictSize = (U32)dictSize;
@@ -870,9 +870,9 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
****************************/
/*
* This generic decompression function cover all use cases.
- * It shall be instanciated several times, using different sets of directives
+ * It shall be instantiated several times, using different sets of directives
* Note that it is essential this generic function is really inlined,
- * in order to remove useless branches during compilation optimisation.
+ * in order to remove useless branches during compilation optimization.
*/
FORCE_INLINE int LZ4_decompress_generic(
const char* source,