mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-06 07:40:00 +08:00
avcodec/hq_hqa: Check available date before allocating frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -149,6 +149,9 @@ static int hq_decode_frame(HQContext *ctx, AVFrame *pic, GetByteContext *gbc,
|
||||
av_log(ctx->avctx, AV_LOG_VERBOSE, "HQ Profile %d\n", prof_num);
|
||||
}
|
||||
|
||||
if (bytestream2_get_bytes_left(gbc) < 3 * (profile->num_slices + 1))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
ctx->avctx->coded_width = FFALIGN(profile->width, 16);
|
||||
ctx->avctx->coded_height = FFALIGN(profile->height, 16);
|
||||
ctx->avctx->width = profile->width;
|
||||
|
Reference in New Issue
Block a user