Commit 9d1adbc5 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Plug another left shift of a negative value

From upstream:

Avoid left shift of a negative value in flush rank calculation.
The C standard permits an undefined result for a left shift of a
negative value.
parent 6ad0fc2f
......@@ -157,7 +157,7 @@ struct static_tree_desc_s {int dummy;}; /* for buggy compilers */
#endif
/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */
#define RANK(f) (((f) << 1) - ((f) > 4 ? 9 : 0))
#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0))
/* ===========================================================================
* Update a hash value with the given input byte
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment