From: Yann Collet Date: Sun, 4 Feb 2024 03:57:38 +0000 (-0800) Subject: use ZSTD_memcpy() X-Git-Tag: v1.5.6^2~70^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fe2e2ad36d434d0989ca669d3a4f4d60f1cb907b;p=thirdparty%2Fzstd.git use ZSTD_memcpy() which can be redirected in Linux kernel mode --- diff --git a/lib/compress/zstd_opt.c b/lib/compress/zstd_opt.c index 04587e855..20a30406a 100644 --- a/lib/compress/zstd_opt.c +++ b/lib/compress/zstd_opt.c @@ -1138,7 +1138,7 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms, */ opt[0].price = LL_PRICE(litlen); ZSTD_STATIC_ASSERT(sizeof(opt[0].rep[0]) == sizeof(rep[0])); - memcpy(&opt[0].rep, rep, sizeof(opt[0].rep)); + ZSTD_memcpy(&opt[0].rep, rep, sizeof(opt[0].rep)); /* large match -> immediate encoding */ { U32 const maxML = matches[nbMatches-1].len;