From: Nathan Moinvaziri Date: Tue, 2 Jun 2020 16:02:07 +0000 (-0700) Subject: Cast distance code to uint64_t before shifting in zng_emit_dist. X-Git-Tag: 1.9.9-b1~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2473943ecc07068ce31542f9dbcf3d099ef4700b;p=thirdparty%2Fzlib-ng.git Cast distance code to uint64_t before shifting in zng_emit_dist. --- diff --git a/trees_emit.h b/trees_emit.h index 30613f70..4cb17db8 100644 --- a/trees_emit.h +++ b/trees_emit.h @@ -144,7 +144,7 @@ static inline uint32_t zng_emit_dist(deflate_state *s, const ct_data *ltree, con send_code_trace(s, code); /* Send the distance code */ - match_bits |= (dtree[code].Code << match_bits_len); + match_bits |= ((uint64_t)dtree[code].Code << match_bits_len); match_bits_len += dtree[code].Len; extra = extra_dbits[code]; if (extra != 0) {