Fix UBSAN issue (zero addition to NULL)
Fix UBSAN issue that came up internally.
This commit is contained in:
committed by
Nick Terrell
parent
23a0643ef1
commit
d01a2c6929
@@ -5951,7 +5951,7 @@ static size_t ZSTD_compressStream_generic(ZSTD_CStream* zcs,
|
|||||||
if (zcs->appliedParams.inBufferMode == ZSTD_bm_stable) {
|
if (zcs->appliedParams.inBufferMode == ZSTD_bm_stable) {
|
||||||
assert(input->pos >= zcs->stableIn_notConsumed);
|
assert(input->pos >= zcs->stableIn_notConsumed);
|
||||||
input->pos -= zcs->stableIn_notConsumed;
|
input->pos -= zcs->stableIn_notConsumed;
|
||||||
ip -= zcs->stableIn_notConsumed;
|
if (ip) ip -= zcs->stableIn_notConsumed;
|
||||||
zcs->stableIn_notConsumed = 0;
|
zcs->stableIn_notConsumed = 0;
|
||||||
}
|
}
|
||||||
if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) {
|
if (zcs->appliedParams.inBufferMode == ZSTD_bm_buffered) {
|
||||||
|
|||||||
Reference in New Issue
Block a user