update to r119

This commit is contained in:
Yann Collet 2014-07-02 22:03:58 +01:00
parent 3a9427237d
commit bdb5bcefff
4 changed files with 13 additions and 7 deletions

View File

@ -31,7 +31,7 @@
# ################################################################
# Version numbers
export RELEASE=rc119
export RELEASE=r119
LIBVER_MAJOR=1
LIBVER_MINOR=2
LIBVER_PATCH=0

3
NEWS
View File

@ -1,3 +1,6 @@
r119:
Fix : overflow address, 32-bits mode (issue 134)
r118:
New : LZ4 Streaming API (Fast version), special thanks to Takayuki Matsuoka
New : datagen : parametrable synthetic data generator for tests

View File

@ -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)

View File

@ -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--;