diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2020-11-08 18:08:43 -0800 |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2020-11-08 18:08:43 -0800 |
commit | 2a2b10f19242aedc8598b74bcb4614d03485c3c0 (patch) | |
tree | ea4c5f4fbe2d76d1f16ad05d4396310b23d1cd83 /lib/lz4.c | |
parent | e251a840253c5564364bf5c8c662a6fe623dc3e9 (diff) | |
download | lz4-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |