diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-08-30 18:13:45 +0100 |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-08-30 18:13:45 +0100 |
commit | 3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8 (patch) | |
tree | d8d19e85de2985447228fb331bbe9eb8b80bb2e6 /programs | |
parent | 14a28c063319a8d7f5da59db6b6a6ef25336b726 (diff) | |
download | lz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.tar.gz lz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.tar.bz2 lz4-3b4e3f2b01df752d82a51d7b7afaa9a2fd5a5ff8.zip |
minor fuzzer code cleanup
Diffstat (limited to 'programs')
-rw-r--r-- | programs/fuzzer.c | 34 | ||||
-rw-r--r-- | programs/lz4io.c | 2 |
2 files changed, 18 insertions, 18 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; } diff --git a/programs/lz4io.c b/programs/lz4io.c index 2715972..20520d6 100644 --- a/programs/lz4io.c +++ b/programs/lz4io.c @@ -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))); } |