From 98b443d9033943c4fd2bde939985af125ccd9e73 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 23 May 2024 16:08:49 +1200 Subject: [PATCH] fuzzing: fix fuzz_stable_sort_r_unstable comparison Credit to OSS-Fuzz. REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69176 Signed-off-by: Douglas Bagnall Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Fri May 31 05:29:08 UTC 2024 on atb-devel-224 --- lib/fuzzing/fuzz_stable_sort_r_unstable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fuzzing/fuzz_stable_sort_r_unstable.c b/lib/fuzzing/fuzz_stable_sort_r_unstable.c index 68174ee460e..9338c75f7dc 100644 --- a/lib/fuzzing/fuzz_stable_sort_r_unstable.c +++ b/lib/fuzzing/fuzz_stable_sort_r_unstable.c @@ -71,8 +71,9 @@ static int cmp_int8(int8_t *_a, int8_t *_b, int8_t *ctx) #define MAX_SIZE (1024 * 1024) -int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) +int LLVMFuzzerTestOneInput(const uint8_t *input, size_t len) { + const int8_t *buf = (const int8_t *)input; int8_t buf2[MAX_SIZE]; int8_t aux[MAX_SIZE]; int8_t context;