mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
avcodec/hq_hqa: Check available date before allocating frame
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
c1f124f3f0
commit
c39e23cc91
1 changed files with 3 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue