On Tue, 14 May 2019 at 20:42, Michael Niedermayer <mich...@niedermayer.cc> wrote:
> Fixes: Timeout (33sec -> 78ms) > Fixes: > 14668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5767073352908800 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by > <https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by>: > Michael Niedermayer <mich...@niedermayer.cc> > --- > libavcodec/pngdec.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c > index 6a681be29d..78988d9e75 100644 > --- a/libavcodec/pngdec.c > +++ b/libavcodec/pngdec.c > @@ -1535,6 +1535,9 @@ static int decode_frame_lscr(AVCodecContext *avctx, > AVFrame *frame = data; > int ret, nb_blocks, offset = 0; > > + if (avpkt->size < 2) > + return AVERROR_INVALIDDATA; > + > Why not 1? Or maybe 3? Or maybe 42? Random numbers to fix random samples are just absurd. Kieran _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".