[zstd] Fix NULL pointer addition in ZSTD_checkContinuity()

Don't start a new section when `dstSize == 0` to avoid NULL
pointer addition.
This commit is contained in:
Nick Terrell
2021-02-05 12:18:06 -08:00
parent 824dff4917
commit f9b1e711ba
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -193,7 +193,7 @@ size_t ZSTD_loadDEntropy(ZSTD_entropyDTables_t* entropy,
* If yes, do nothing (continue on current segment).
* If not, classify previous segment as "external dictionary", and start a new segment.
* This function cannot fail. */
void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst);
void ZSTD_checkContinuity(ZSTD_DCtx* dctx, const void* dst, size_t dstSize);
#endif /* ZSTD_DECOMPRESS_INTERNAL_H */