]> wimlib.net Git - wimlib/blobdiff - tools/afl-fuzz/decompress/fuzz.c
tools/afl-fuzz: fix ctype calculation
[wimlib] / tools / afl-fuzz / decompress / fuzz.c
index 546a695e0972451e15c5075427dbadc6222ad206..b3d4b90cedde2b7c7615bd7e014098bdecdd909a 100644 (file)
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
                return 0;
        ret = read(fd, &ctype, 1);
        assert(ret == 1);
-       ctype = 1 + ((ctype - 1) % 3); /* 1-3 */
+       ctype = 1 + ((uint8_t)(ctype - 1) % 3); /* 1-3 */
        csize = stbuf.st_size - 1;
        uspace = csize * 8;