History

avcodec/hq_hqa: Check available date before allocating frame

Andreas Rheinhardt committed 1 year ago

Commit c39e23c1 parent c1f124f1 file · +3 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/hq_hqa.c+3−0
@@ -149,6 +149,9 @@ static int hq_decode_frame(HQContext *ctx, AVFrame *pic, GetByteContext *gbc, · 148 unmodified lines
149 av_log(ctx->avctx, AV_LOG_VERBOSE, "HQ Profile %d\n", prof_num);149 av_log(ctx->avctx, AV_LOG_VERBOSE, "HQ Profile %d\n", prof_num);
150 }150 }
151 151
152 if (bytestream2_get_bytes_left(gbc) < 3 * (profile->num_slices + 1))
153 return AVERROR_INVALIDDATA;
154
152 ctx->avctx->coded_width = FFALIGN(profile->width, 16);155 ctx->avctx->coded_width = FFALIGN(profile->width, 16);
153 ctx->avctx->coded_height = FFALIGN(profile->height, 16);156 ctx->avctx->coded_height = FFALIGN(profile->height, 16);
154 ctx->avctx->width = profile->width;157 ctx->avctx->width = profile->width;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t