fixed wrong size test
This commit is contained in:
parent
89741653ab
commit
33a3f18848
@ -533,7 +533,7 @@ static size_t HUF_compress_internal (
|
|||||||
|
|
||||||
/* checks & inits */
|
/* checks & inits */
|
||||||
if (((size_t)workSpace & 3) != 0) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */
|
if (((size_t)workSpace & 3) != 0) return ERROR(GENERIC); /* must be aligned on 4-bytes boundaries */
|
||||||
if (wkspSize < sizeof(table)) return ERROR(workSpace_tooSmall);
|
if (wkspSize < sizeof(*table)) return ERROR(workSpace_tooSmall);
|
||||||
if (!srcSize) return 0; /* Uncompressed */
|
if (!srcSize) return 0; /* Uncompressed */
|
||||||
if (!dstSize) return 0; /* cannot fit anything within dst budget */
|
if (!dstSize) return 0; /* cannot fit anything within dst budget */
|
||||||
if (srcSize > HUF_BLOCKSIZE_MAX) return ERROR(srcSize_wrong); /* current block size limit */
|
if (srcSize > HUF_BLOCKSIZE_MAX) return ERROR(srcSize_wrong); /* current block size limit */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user