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:38:57 +0000 (00:38 +0100)
commit69673d02790f7917d11055236ecfa20c9ff8771a
treed4b3da6c9a996a6aac3d567a7eedafc40de69632
parent3047b0a4a3e749e62e413f8fc96ae2e9fe228477
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