summaryrefslogtreecommitdiffstats
path: root/programs/fuzzer.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-08-30 17:13:45 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-08-30 17:13:45 (GMT)
commit3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8 (patch)
treed8d19e85de2985447228fb331bbe9eb8b80bb2e6 /programs/fuzzer.c
parent14a28c063319a8d7f5da59db6b6a6ef25336b726 (diff)
downloadlz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.zip
lz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.tar.gz
lz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.tar.bz2
minor fuzzer code cleanup
Diffstat (limited to 'programs/fuzzer.c')
-rw-r--r--programs/fuzzer.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/programs/fuzzer.c b/programs/fuzzer.c
index 6dff4cb..f19382c 100644
--- a/programs/fuzzer.c
+++ b/programs/fuzzer.c
@@ -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;
}