Skip to content

Commit f0cd561

Browse files
JeromeMartinezmichaelni
authored andcommitted
avcodec/ffv1dec: reject unsupported ffv1 versions
Signed-off-by: Michael Niedermayer <[email protected]>
1 parent 916be62 commit f0cd561

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libavcodec/ffv1dec.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,11 @@ static int read_extra_header(FFV1Context *f)
439439
av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n");
440440
return AVERROR_INVALIDDATA;
441441
}
442+
if (f->version > 4) {
443+
av_log(f->avctx, AV_LOG_ERROR, "unsupported version %d\n",
444+
f->version);
445+
return AVERROR_PATCHWELCOME;
446+
}
442447
if (f->version > 2) {
443448
c->bytestream_end -= 4;
444449
f->micro_version = get_symbol(c, state, 0);

0 commit comments

Comments
 (0)