minor fuzzer code cleanup
authorYann Collet <yann.collet.73@gmail.com>
Sat, 30 Aug 2014 17:13:45 +0000 (18:13 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Sat, 30 Aug 2014 17:13:45 +0000 (18:13 +0100)
programs/fuzzer.c
programs/lz4io.c

index 6dff4cb..f19382c 100644 (file)
@@ -219,31 +219,31 @@ int FUZ_AddressOverflow(void)
         char* input = buffers[nbBuff-1];
         char* output = buffers[nbBuff];
         int r;
-        input[0] = 0xF0;   // Literal length overflow
-        input[1] = 0xFF;
-        input[2] = 0xFF;
-        input[3] = 0xFF;
-        for(i = 4; i <= nbOf255+4; i++) input[i] = 0xff;
+        input[0] = (char)0xF0;   // Literal length overflow
+        input[1] = (char)0xFF;
+        input[2] = (char)0xFF;
+        input[3] = (char)0xFF;
+        for(i = 4; i <= nbOf255+4; i++) input[i] = (char)0xff;
         r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134);
         if (r>0) goto _overflowError;
-        input[0] = 0x1F;   // Match length overflow
-        input[1] = 0x01;
-        input[2] = 0x01;
-        input[3] = 0x00;
+        input[0] = (char)0x1F;   // Match length overflow
+        input[1] = (char)0x01;
+        input[2] = (char)0x01;
+        input[3] = (char)0x00;
         r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134);
         if (r>0) goto _overflowError;
 
         output = buffers[nbBuff-2];   // Reverse in/out pointer order
-        input[0] = 0xF0;   // Literal length overflow
-        input[1] = 0xFF;
-        input[2] = 0xFF;
-        input[3] = 0xFF;
+        input[0] = (char)0xF0;   // Literal length overflow
+        input[1] = (char)0xFF;
+        input[2] = (char)0xFF;
+        input[3] = (char)0xFF;
         r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134);
         if (r>0) goto _overflowError;
-        input[0] = 0x1F;   // Match length overflow
-        input[1] = 0x01;
-        input[2] = 0x01;
-        input[3] = 0x00;
+        input[0] = (char)0x1F;   // Match length overflow
+        input[1] = (char)0x01;
+        input[2] = (char)0x01;
+        input[3] = (char)0x00;
         r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134);
         if (r>0) goto _overflowError;
     }
index 2715972..20520d6 100644 (file)
@@ -233,7 +233,7 @@ int LZ4IO_setNotificationLevel(int level)
 
 
 /* ************************************************************************ */
-/* ********************** LZ4 File / Stream compression ******************* */
+/* ********************** LZ4 File / Pipe compression ********************* */
 /* ************************************************************************ */
 
 static int          LZ4S_GetBlockSize_FromBlockId (int id) { return (1 << (8 + (2 * id))); }