diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-07-02 21:03:58 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-07-02 21:03:58 (GMT) |
commit | bdb5bcefff1c09592e2a85e38eac8e9c493ecef9 (patch) | |
tree | eb91f6a2cd8d161d455565318bf9b8bbfbda0df9 /programs | |
parent | 3a9427237dae41c0abd0a07d8ac862cbb9a037c3 (diff) | |
download | lz4-bdb5bcefff1c09592e2a85e38eac8e9c493ecef9.zip lz4-bdb5bcefff1c09592e2a85e38eac8e9c493ecef9.tar.gz lz4-bdb5bcefff1c09592e2a85e38eac8e9c493ecef9.tar.bz2 |
update to r119
Diffstat (limited to 'programs')
-rw-r--r-- | programs/Makefile | 2 | ||||
-rw-r--r-- | programs/fuzzer.c | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/programs/Makefile b/programs/Makefile index ff45903..a3e01a4 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -30,7 +30,7 @@ # fullbench32: Same as fullbench, but forced to compile in 32-bits mode # ################################################################ -RELEASE=rc119 +RELEASE=r119 DESTDIR= PREFIX=/usr CC:=$(CC) diff --git a/programs/fuzzer.c b/programs/fuzzer.c index d5ff318..b745be9 100644 --- a/programs/fuzzer.c +++ b/programs/fuzzer.c @@ -26,6 +26,9 @@ Remove Visual warning messages **************************************/ #define _CRT_SECURE_NO_WARNINGS // fgets +#ifdef _MSC_VER /* Visual Studio */ +# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */ +#endif /************************************** @@ -232,7 +235,7 @@ int FUZ_Issue134() return 0; } { - size_t sizeToGenerateOverflow = - ((size_t)buffers[nbBuff-1]) + 512; + size_t sizeToGenerateOverflow = (size_t)(- ((size_t)buffers[nbBuff-1]) + 512); size_t nbOf255 = (sizeToGenerateOverflow / 255) + 1; char* input = buffers[nbBuff-1]; char* output = buffers[nbBuff]; @@ -243,13 +246,13 @@ int FUZ_Issue134() input[3] = 0xFF; for(i = 3; (size_t)i <= nbOf255+4; i++) input[i] = 0xff; r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134); - printf(" Literal overflow passed (return = %i < 0)\n",r); + printf(" Literal overflow detected (return = %i < 0)\n",r); input[0] = 0x1F; // Match length overflow input[1] = 0x01; input[2] = 0x01; input[3] = 0x00; r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134); - printf(" Match overflow passed (return = %i < 0)\n",r); + printf(" Match overflow detected (return = %i < 0)\n",r); if (nbBuff>=2) { output = buffers[nbBuff-2]; @@ -259,13 +262,13 @@ int FUZ_Issue134() input[2] = 0xFF; input[3] = 0xFF; r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134); - printf(" Literal overflow passed (return = %i < 0)\n",r); + printf(" Literal overflow detected (return = %i < 0)\n",r); input[0] = 0x1F; // Match length overflow input[1] = 0x01; input[2] = 0x01; input[3] = 0x00; r = LZ4_decompress_safe(input, output, nbOf255+64, BLOCKSIZE_I134); - printf(" Match overflow passed (return = %i < 0)\n",r); + printf(" Match overflow detected (return = %i < 0)\n",r); } } free (buffers[nbBuff]); nbBuff--; |