From ebfe154bd52204a4da19d26d8d5ae0f8003558ac Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sat, 26 Apr 2014 20:56:31 +0200 Subject: [PATCH] avcodec/apedec: tmpk==32 is not supported, prevent undefined behavior Fixes CID1206639 Signed-off-by: Michael Niedermayer --- libavcodec/apedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 7e1c6bb6cd..1fd41cdd9d 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -529,7 +529,7 @@ static inline int ape_decode_value_3900(APEContext *ctx, APERice *rice) return AVERROR_INVALIDDATA; } x = range_decode_bits(ctx, tmpk); - } else if (tmpk <= 32) { + } else if (tmpk <= 31) { x = range_decode_bits(ctx, 16); x |= (range_decode_bits(ctx, tmpk - 16) << 16); } else {