From: Douglas Bagnall Date: Thu, 23 May 2024 04:08:49 +0000 (+1200) Subject: fuzzing: fix fuzz_stable_sort_r_unstable comparison X-Git-Url: http://git.samba.org/?a=commitdiff_plain;ds=sidebyside;h=HEAD;p=samba.git 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 --- 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;