Fixes: Timeout
Fixes: 10108/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-6222384351674368
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
s->max_ra = INT_MIN;
}
+ s->overlap ++;
ret = hevc_frame_start(s);
if (ret < 0)
return ret;
s->ref = NULL;
s->last_eos = s->eos;
s->eos = 0;
+ s->overlap = 0;
/* split the input packet into NAL units, so we know the upper bound on the
* number of slices in the frame */
continue;
ret = decode_nal_unit(s, nal);
+ if (ret >= 0 && s->overlap > 2)
+ ret = AVERROR_INVALIDDATA;
if (ret < 0) {
av_log(s->avctx, AV_LOG_WARNING,
"Error parsing NAL unit #%d.\n", i);
int max_ra;
int bs_width;
int bs_height;
+ int overlap;
int is_decoded;
int no_rasl_output_flag;