Commit ebfe154b authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/apedec: tmpk==32 is not supported, prevent undefined behavior

Fixes CID1206639
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 669a09fb
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment