mirror of
https://github.com/facebook/zstd.git
synced 2025-03-06 16:56:49 +02:00
Fix UBSAN issue (zero addition to NULL)
Fix UBSAN issue that came up internally.
This commit is contained in:
parent
23a0643ef1
commit
d01a2c6929
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user