From f1de371eb4d823cc803b9c052debc006299b64be Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sun, 5 Feb 2023 15:57:58 -0800 Subject: [PATCH] fix oss-fuzz case 55714 happening only when enabling Legacy Format v0.3 and in 32-bit mode (note: support for format 0.3 is disabled by default) --- lib/legacy/zstd_v03.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/legacy/zstd_v03.c b/lib/legacy/zstd_v03.c index 5b1fd7175c..8ec2e7350b 100644 --- a/lib/legacy/zstd_v03.c +++ b/lib/legacy/zstd_v03.c @@ -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 */