1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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

Fixes CID1206639
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-26 20:56:31 +02:00
parent 669a09fb37
commit ebfe154bd5

View File

@ -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 {