diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index 51ca810c05..daf906ba0c 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -161,6 +161,10 @@ static int read_table(GetBitContext *gb, Table *t, const int8_t code_pred_coeff[ c -= (x + 4) / 8; else c += (-x + 3) / 8; + if (!is_signed) { + if (c < offset || c >= offset + (1<coeff[i][j] = c; } }