diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c index e0519d2a0b..ae3fe428dd 100644 --- a/libavcodec/dstdec.c +++ b/libavcodec/dstdec.c @@ -162,6 +162,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; } }