lib:compression: Fix undefined behavior in lzxpress
[sfrench/samba-autobuild/.git] / lib / compression / lzxpress.c
index a4ded7e45554d31ec991cac30d7c1493f02ef37a..024aba4c2ce8aa1b868a1001c36cc5091cb894a0 100644 (file)
@@ -225,7 +225,7 @@ ssize_t lzxpress_compress(const uint8_t *uncompressed,
                for (; (indic_bit % 32) != 0; indic_bit++)
                        indic |= 0 << (32 - ((indic_bit % 32) + 1));
 
-               *(uint32_t *)&compressed[compressed_pos] = 0;
+               SIVAL(compressed, compressed_pos, 0);
                SIVAL(indic_pos, 0, indic);
                compressed_pos += sizeof(uint32_t);
        }