]> granicus.if.org Git - xz/commitdiff
liblzma: Fix one more unaligned read to use unaligned_read16ne().
authorLasse Collin <lasse.collin@tukaani.org>
Sat, 1 Jun 2019 21:50:59 +0000 (00:50 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sat, 1 Jun 2019 21:50:59 +0000 (00:50 +0300)
src/liblzma/lz/lz_encoder_hash.h

index 342a333d16823a7ca4bb9007b5d397a6d5aad773..f238f9d9dce13eb61cf1087c1905486c6042cbe4 100644 (file)
@@ -39,7 +39,7 @@
 // Endianness doesn't matter in hash_2_calc() (no effect on the output).
 #ifdef TUKLIB_FAST_UNALIGNED_ACCESS
 #      define hash_2_calc() \
-               const uint32_t hash_value = *(const uint16_t *)(cur)
+               const uint32_t hash_value = unaligned_read16ne(cur)
 #else
 #      define hash_2_calc() \
                const uint32_t hash_value \