aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check/crc32_fast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/liblzma/check/crc32_fast.c')
-rw-r--r--src/liblzma/check/crc32_fast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liblzma/check/crc32_fast.c b/src/liblzma/check/crc32_fast.c
index 3de02638d776..eed7350582e4 100644
--- a/src/liblzma/check/crc32_fast.c
+++ b/src/liblzma/check/crc32_fast.c
@@ -49,7 +49,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
// Calculate the CRC32 using the slice-by-eight algorithm.
while (buf < limit) {
- crc ^= *(const uint32_t *)(buf);
+ crc ^= aligned_read32ne(buf);
buf += 4;
crc = lzma_crc32_table[7][A(crc)]
@@ -57,7 +57,7 @@ lzma_crc32(const uint8_t *buf, size_t size, uint32_t crc)
^ lzma_crc32_table[5][C(crc)]
^ lzma_crc32_table[4][D(crc)];
- const uint32_t tmp = *(const uint32_t *)(buf);
+ const uint32_t tmp = aligned_read32ne(buf);
buf += 4;
// At least with some compilers, it is critical for