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, 26 Nov 2016 23:46:35 +0000 (00:46 +0100)
commit0b948b1b8d100491934f00bc6d72009de0c99b05
tree1ecb6e832759b757694c904c236cd18cb31ce2bc
parentf76947fd567f20287bc8ca8e692a59026bac19e7
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>
(cherry picked from commit cdb5479c9ddc886f0b8661db585405ebab343e80)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/pnmdec.c