mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-08 10:56:05 +00:00
Check unp_size for possible overflows too
Originally committed as revision 10490 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
208506e2a6
commit
f0dd9d4505
@ -590,7 +590,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
}
|
||||
stereo = get_bits1(&gb);
|
||||
bits = get_bits1(&gb);
|
||||
if ((unp_size << !bits) > *data_size) {
|
||||
if (unp_size & 0xC0000000 || (unp_size << !bits) > *data_size) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Frame is too large to fit in buffer\n");
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user