Skip to content

Commit

Permalink
Merge pull request #4238 from szsam/patch-1
Browse files Browse the repository at this point in the history
fix out-of-bounds array index access
  • Loading branch information
Cyan4973 authored Jan 16, 2025
2 parents 33747e2 + afff3d2 commit 19025f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/compress/zstd_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -6687,6 +6687,7 @@ ZSTD_transferSequences_wBlockDelim(ZSTD_CCtx* cctx,
ZSTD_storeSeq(&cctx->seqStore, litLength, ip, iend, offBase, matchLength);
ip += matchLength + litLength;
}
RETURN_ERROR_IF(idx == inSeqsSize, externalSequences_invalid, "Block delimiter not found.");

/* If we skipped repcode search while parsing, we need to update repcodes now */
assert(externalRepSearch != ZSTD_ps_auto);
Expand Down

0 comments on commit 19025f3

Please sign in to comment.