pnmdec: make sure v is capped by maxval
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Wed, 9 Nov 2016 00:09:35 +0000 (01:09 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 12 Nov 2016 00:36:47 +0000 (01:36 +0100)
commitcdb5479c9ddc886f0b8661db585405ebab343e80
tree62061b31abfdac1ecd66b5655877bcf4777b7a2b
parent484151df7c8f4fb45229b9b3a585efd3faa62501
pnmdec: make sure v is capped by maxval

Otherwise put_bits can be called with a value that doesn't fit in the
sample_len, causing an assertion failure.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/pnmdec.c