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>
Fri, 1 Dec 2017 23:28:59 +0000 (00:28 +0100)
commitb9e9c5cee03ff9a092f9d8f13df22d91979c24e3
treefa67061086db66f04778238a548ea0795fdb70ce
parentb45971a955572390dca2c180c3477995152447df
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