Fix UBSAN issue (zero addition to NULL)

Fix UBSAN issue that came up internally.
This commit is contained in:
Nick Terrell
2023-05-26 13:43:47 -07:00
committed by Nick Terrell
parent 23a0643ef1
commit d01a2c6929
+1 -1
View File
@@ -5951,7 +5951,7 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
if (zcs->appliedParams.inBufferMode == ZSTD_bm_stable) {
assert(input->pos >= zcs->stableIn_notConsumed);
input->pos -= zcs->stableIn_notConsumed;
ip -= zcs->stableIn_notConsumed;
if (ip) ip -= zcs->stableIn_notConsumed;
zcs->stableIn_notConsumed = 0;
}
if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) {