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>
Wed, 31 Jan 2018 21:56:14 +0000 (22:56 +0100)
commitd8fb143546da2142e21a845a3d493d200267b8ec
tree77cbf8cf09ec6f3bdacd15894c0779e9674ac97a
parentefe9439caa250a2729cbaf968acda558fe503f4f
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>
(cherry picked from commit 51090133b31bc719ea868db15d3ee38e9dbe90f1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/cngdec.c