aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-09-17 00:21:52 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2023-10-03 20:09:27 +0200
commitfe6d46490f5ea9155fe0601b6246960ae17317fc (patch)
tree9af2b2aaa87bc0889d19d70c7b5638954cea5138
parent515c0247a3062ca4639e457c81d2f58c504e9e8f (diff)
downloadffmpeg-fe6d46490f5ea9155fe0601b6246960ae17317fc.tar.gz
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>
-rw-r--r--libavcodec/escape124.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c
index cd62f8d1f0..357320ef94 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -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;
}