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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fe6d46490f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-09-17 00:21:52 +02:00
parent 454eac7b87
commit ee6d5dd13b
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 2 additions and 2 deletions

View File

@ -238,7 +238,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
if ((ret = av_frame_ref(frame, s->frame)) < 0)
return ret;
return frame_size;
return 0;
}
for (i = 0; i < 3; i++) {
@ -372,7 +372,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
*got_frame = 1;
return frame_size;
return 0;
}