[zstd] Fix seqStore growth

We could undersize the literals buffer by up to 11 bytes,
due to a combination of 2 bugs:
* The literals buffer didn't have `WILDCOPY_OVERLENGTH` extra
  space, like it is supposed to.
* We didn't check the literals buffer size in `ZSTD_sufficientBuff()`.
This commit is contained in:
Nick Terrell
2018-08-28 13:24:44 -07:00
parent 5a4e6c9f3d
commit 5e580de6da
3 changed files with 23 additions and 9 deletions
+1
View File
@@ -193,6 +193,7 @@ typedef struct {
BYTE* mlCode;
BYTE* ofCode;
size_t maxNbSeq;
size_t maxNbLit;
U32 longLengthID; /* 0 == no longLength; 1 == Lit.longLength; 2 == Match.longLength; */
U32 longLengthPos;
} seqStore_t;