make_canonical_huffman_code(): Stricter validation of max_codeword_len
authorEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:33:08 +0000 (23:33 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Sat, 14 Jun 2014 04:34:35 +0000 (23:34 -0500)
commit757b2d7b9005bd959855428d15e1fb3bf9c1f3fb
tree374e547dd8aeed774c1e62631aa30d990bee535c
parenta4458395b4e8227b7f125ab99cea6a0a6d87ee8f
make_canonical_huffman_code():  Stricter validation of max_codeword_len

max_codeword_len must be long enough to give a distinct codeword to each
symbol.  As we also check that num_syms >= 2, use this check instead of
max_codeword_len > 0.
src/compress_common.c