Skip to content

Commit

Permalink
Fix UBSAN issue (zero addition to NULL)
Browse files Browse the repository at this point in the history
Fix UBSAN issue that came up internally.
  • Loading branch information
Nick Terrell authored and terrelln committed May 26, 2023
1 parent 23a0643 commit d01a2c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compress/zstd_compress.c
Expand Up @@ -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) {
Expand Down

0 comments on commit d01a2c6

Please sign in to comment.