]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Changed minigzip fuzzer outmode[3] to be determined based on a different value then...
authorNathan Moinvaziri <nathan@nathanm.com>
Thu, 15 Apr 2021 15:44:03 +0000 (08:44 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Wed, 28 Apr 2021 21:38:34 +0000 (23:38 +0200)
test/fuzz/minigzip_fuzzer.c

index 57e8588882570b763c2793cdd4abb212ed2cf895..5a15c662b4323989196291abe2ab1fa24638bbe4 100644 (file)
@@ -267,7 +267,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataLen) {
     /* Compression level: [0..9]. */
     outmode[2] = data[0] % 10;
 
-    switch (data[0] % 4) {
+    switch (data[dataLen-1] % 4) {
     default:
     case 0:
         outmode[3] = 0;