diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 0a71a6f5ab..ae0e504674 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -1611,7 +1611,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx, void *data, int *data_size, /* EOF */ if (start_code < 0) { goto the_end; - } else if (unescaped_buf_size > (1U<<29)) { + } else if (unescaped_buf_size > (1U<<28)) { av_log(avctx, AV_LOG_ERROR, "MJPEG packet 0x%x too big (0x%x/0x%x), corrupt data?\n", start_code, unescaped_buf_size, buf_size); return AVERROR_INVALIDDATA;