summaryrefslogtreecommitdiff
path: root/lib/lz4.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2020-11-08 18:08:43 -0800
committerYann Collet <yann.collet.73@gmail.com>2020-11-08 18:08:43 -0800
commit2a2b10f19242aedc8598b74bcb4614d03485c3c0 (patch)
treeea4c5f4fbe2d76d1f16ad05d4396310b23d1cd83 /lib/lz4.c
parente251a840253c5564364bf5c8c662a6fe623dc3e9 (diff)
downloadlz4-2a2b10f19242aedc8598b74bcb4614d03485c3c0.tar.gz
lz4-2a2b10f19242aedc8598b74bcb4614d03485c3c0.tar.bz2
lz4-2a2b10f19242aedc8598b74bcb4614d03485c3c0.zip
fixed remaining ubsan warnings
Diffstat (limited to 'lib/lz4.c')
-rw-r--r--lib/lz4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lz4.c b/lib/lz4.c
index 427673e..b066c55 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1662,7 +1662,7 @@ int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; }
if (safeBuffer == NULL) assert(dictSize == 0);
- if (safeBuffer != NULL)
+ if (dictSize > 0)
memmove(safeBuffer, previousDictEnd - dictSize, dictSize);
dict->dictionary = (const BYTE*)safeBuffer;