From d076b6e800d87bd6fb3899a919ccaba235d0a1eb Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sat, 26 Jan 2019 10:48:14 +1100 Subject: [PATCH] Remove hand-written decode_huffman_fast type pun Type punning is undefined behavior. --- script/wuffs-deflate-decoder-decode-huffman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/wuffs-deflate-decoder-decode-huffman.c b/script/wuffs-deflate-decoder-decode-huffman.c index 799f6477..7868a005 100644 --- a/script/wuffs-deflate-decoder-decode-huffman.c +++ b/script/wuffs-deflate-decoder-decode-huffman.c @@ -458,7 +458,7 @@ outer_loop: // the overrun. if (dist_minus_1 + 1 >= 8) { while (1) { - *((uint64_t*)(pdst)) = *((uint64_t*)(pback)); + memcpy(pdst, pback, 8); if (length <= 8) { pdst += length; break;