History

avcodec/hq_hqa: Check info size

Fixes: assertion failure Fixes: 21079/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5737046523248640

Michael Niedermayer committed 6 years ago

Commit cf285211 parent b6c84441 file · +1 −1Browse files

Unified · Split

libavcodec/hq_hqa.c+1−1
@@ -321,7 +321,7 @@ static int hq_hqa_decode_frame(AVCodecContext *avctx, void *data, · 320 unmodified lines
321 int info_size;321 int info_size;
322 bytestream2_skip(&ctx->gbc, 4);322 bytestream2_skip(&ctx->gbc, 4);
323 info_size = bytestream2_get_le32(&ctx->gbc);323 info_size = bytestream2_get_le32(&ctx->gbc);
324 if (bytestream2_get_bytes_left(&ctx->gbc) < info_size) {324 if (info_size < 0 || bytestream2_get_bytes_left(&ctx->gbc) < info_size) {
325 av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", info_size);325 av_log(avctx, AV_LOG_ERROR, "Invalid INFO size (%d).\n", info_size);
326 return AVERROR_INVALIDDATA;326 return AVERROR_INVALIDDATA;
327 }327 }

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