mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/pafvideo: Fix assertion failure
Fixes: 2100/clusterfuzz-testcase-minimized-4522961547558912
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c4360559ee
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
31dd76349a
commit
1afe127401
|
@ -273,7 +273,7 @@ static int paf_video_decode(AVCodecContext *avctx, void *data,
|
||||||
bytestream2_init(&c->gb, pkt->data, pkt->size);
|
bytestream2_init(&c->gb, pkt->data, pkt->size);
|
||||||
|
|
||||||
code = bytestream2_get_byte(&c->gb);
|
code = bytestream2_get_byte(&c->gb);
|
||||||
if ((code & 0xF) > 4) {
|
if ((code & 0xF) > 4 || (code & 0xF) == 3) {
|
||||||
avpriv_request_sample(avctx, "unknown/invalid code");
|
avpriv_request_sample(avctx, "unknown/invalid code");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue