copy fix for v0.3 to v0.4

in case it would be applicable for this legacy version too.
This commit is contained in:
Yann Collet
2023-02-07 13:55:30 -08:00
committed by Yann Collet
parent 7eb4471fec
commit b20e4e95f2
2 changed files with 12 additions and 5 deletions
+1 -1
View File
@@ -2710,7 +2710,7 @@ static size_t ZSTD_execSequence(BYTE* op,
if (seqLength > (size_t)(oend - op)) return ERROR(dstSize_tooSmall);
if (sequence.litLength > (size_t)(litLimit - *litPtr)) return ERROR(corruption_detected);
/* Now we know there are no overflow in literal nor match lengths, can use the pointer check */
/* Now we know there are no overflow in literal nor match lengths, can use pointer checks */
if (oLitEnd > oend_8) return ERROR(dstSize_tooSmall);
if (sequence.offset > (U32)(oLitEnd - base)) return ERROR(corruption_detected);