]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
fuzzing: fix fuzz_stable_sort_r_unstable comparison
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 23 May 2024 04:08:49 +0000 (16:08 +1200)
committerVolker Lendecke <vl@samba.org>
Fri, 31 May 2024 05:29:08 +0000 (05:29 +0000)
Credit to OSS-Fuzz.

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=69176

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri May 31 05:29:08 UTC 2024 on atb-devel-224

lib/fuzzing/fuzz_stable_sort_r_unstable.c

index 68174ee460ef7bff12e00f6058fd35ff99d08389..9338c75f7dce1cedff65ac670ecfc816551d65aa 100644 (file)
@@ -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;