diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-02-20 20:00:44 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-02-22 18:01:51 +0100 |
commit | 8874cfa2e174cf1a94123fc2f1a3aa4d307a270f (patch) | |
tree | ce0e42be5079537ac5e9f6806249167e9e886844 | |
parent | d495747a9fc5fb8dcac4b23c5bdca3c5c16dd152 (diff) | |
download | ffmpeg-8874cfa2e174cf1a94123fc2f1a3aa4d307a270f.tar.gz |
avcodec/rka: check for size 1 filter
Such filters will not advance and be stuck in the current implementation
Fixes: Infinite loop
Fixes: 56052/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RKA_fuzzer-5236218750435328
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/rka.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/rka.c b/libavcodec/rka.c index 994c563ffd..7452acf27f 100644 --- a/libavcodec/rka.c +++ b/libavcodec/rka.c @@ -691,7 +691,7 @@ static int decode_filter(RKAContext *s, ChContext *ctx, ACoder *ac, int off, uns else split = size >> 4; - if (size <= 0) + if (size <= 1) return 0; for (int x = 0; x < size;) { |