From fe2e2ad36d434d0989ca669d3a4f4d60f1cb907b Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Sat, 3 Feb 2024 19:57:38 -0800 Subject: [PATCH] use ZSTD_memcpy() which can be redirected in Linux kernel mode --- lib/compress/zstd_opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.47.3