Skip to content

Commit

Permalink
fix oss-fuzz case 55714
Browse files Browse the repository at this point in the history
happening only when enabling Legacy Format v0.3 and in 32-bit mode
(note: support for format 0.3 is disabled by default)
  • Loading branch information
Cyan4973 committed Feb 6, 2023
1 parent 79bdb8c commit f1de371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/legacy/zstd_v03.c
Original file line number Diff line number Diff line change
Expand Up @@ -2711,7 +2711,7 @@ static size_t ZSTD_execSequence(BYTE* op,
if (litEnd > litLimit) return ERROR(corruption_detected); /* overRead beyond lit buffer */

/* copy Literals */
ZSTD_wildcopy(op, *litPtr, sequence.litLength); /* note : oLitEnd <= oend-8 : no risk of overwrite beyond oend */
ZSTD_memmove(op, *litPtr, sequence.litLength); /* note : used to be wildCopy, changed to fix a bug in 32-bit mode (oss-fuzz case 55714) */
op = oLitEnd;
*litPtr = litEnd; /* update for next sequence */

Expand Down

0 comments on commit f1de371

Please sign in to comment.