Merge pull request #3900 from facebook/fix5921623844651008
fix 5921623844651008
This commit is contained in:
@@ -168,7 +168,7 @@ typedef struct {
|
|||||||
|
|
||||||
typedef enum { zop_dynamic=0, zop_predef } ZSTD_OptPrice_e;
|
typedef enum { zop_dynamic=0, zop_predef } ZSTD_OptPrice_e;
|
||||||
|
|
||||||
#define ZSTD_OPT_SIZE (ZSTD_OPT_NUM+2)
|
#define ZSTD_OPT_SIZE (ZSTD_OPT_NUM+3)
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* All tables are allocated inside cctx->workspace by ZSTD_resetCCtx_internal() */
|
/* All tables are allocated inside cctx->workspace by ZSTD_resetCCtx_internal() */
|
||||||
unsigned* litFreq; /* table of literals statistics, of size 256 */
|
unsigned* litFreq; /* table of literals statistics, of size 256 */
|
||||||
|
|||||||
@@ -1196,7 +1196,7 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
/* check further positions */
|
/* check further positions */
|
||||||
for (cur = 1; cur <= last_pos; cur++) {
|
for (cur = 1; cur <= last_pos; cur++) {
|
||||||
const BYTE* const inr = ip + cur;
|
const BYTE* const inr = ip + cur;
|
||||||
assert(cur < ZSTD_OPT_NUM);
|
assert(cur <= ZSTD_OPT_NUM);
|
||||||
DEBUGLOG(7, "cPos:%zi==rPos:%u", inr-istart, cur);
|
DEBUGLOG(7, "cPos:%zi==rPos:%u", inr-istart, cur);
|
||||||
|
|
||||||
/* Fix current position with one literal if cheaper */
|
/* Fix current position with one literal if cheaper */
|
||||||
|
|||||||
Reference in New Issue
Block a user