[FFmpeg-devel] [PATCH 2/2] avutil/aes: Silence fuzzer about accessing round_key
Michael Niedermayer
michael at niedermayer.cc
Mon Sep 19 00:57:04 EEST 2022
Fixes: index 32 out of bounds for type 'uint8_t [16]'
Fixes: 51253/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5968304170205184
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavutil/aes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavutil/aes.c b/libavutil/aes.c
index 029d738f870..8f3e04e7c6d 100644
--- a/libavutil/aes.c
+++ b/libavutil/aes.c
@@ -251,7 +251,7 @@ int av_aes_init(AVAES *a, const uint8_t *key, int key_bits, int decrypt)
tk[j][i] ^= sbox[tk[j - 1][i]];
}
- memcpy(a->round_key[0].u8 + t, tk, KC * 4);
+ memcpy((uint8_t*)a->round_key[0].u8 + t, tk, KC * 4);
}
if (decrypt) {
--
2.17.1
More information about the ffmpeg-devel
mailing list