avcodec/escape124: Do not return random numbers

Fixes: out of array access
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-6035022714634240
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-6422176201572352

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 515c0247
......@@ -234,7 +234,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
if ((ret = av_frame_ref(frame, s->frame)) < 0)
return ret;
return frame_size;
return 0;
}
for (i = 0; i < 3; i++) {
......@@ -367,7 +367,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVFrame *frame,
*got_frame = 1;
return frame_size;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment