smvjpegdec: make sure cur_frame is not negative
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Thu, 10 Nov 2016 21:09:03 +0000 (22:09 +0100)
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Sat, 26 Nov 2016 23:28:05 +0000 (00:28 +0100)
commiteaf79ac2d9c18bce3c1990dbf6722e90d9c788b1
treea89cd9d3c167b5dbe239c1aa7d1124a043b3bb03
parentc35a140e71710d815bab9581e928b42177feaf7e
smvjpegdec: make sure cur_frame is not negative

This fixes a heap-buffer-overflow detected by AddressSanitizer.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 360bc0d90aa66cf21e9f488e77d21db18e01ec9c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
libavcodec/smvjpegdec.c