avcodec/cngdec: Fix integer clipping
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 2 Nov 2017 17:34:09 +0000 (18:34 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 9 Nov 2017 18:49:32 +0000 (19:49 +0100)
commit51090133b31bc719ea868db15d3ee38e9dbe90f1
tree5f6cbe58f09e9ffb39d27ca7ff8de02fdc4145b9
parent28f5753fed4b462c868ce5a952fb770246620fa0
avcodec/cngdec: Fix integer clipping

Fixes: runtime error: value -36211.7 is outside the range of representable values of type 'short'
Fixes: 2992/clusterfuzz-testcase-6649611793989632

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cngdec.c