]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
use ZSTD_memcpy()
authorYann Collet <yann.collet.73@gmail.com>
Sun, 4 Feb 2024 03:57:38 +0000 (19:57 -0800)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 4 Feb 2024 03:57:38 +0000 (19:57 -0800)
which can be redirected in Linux kernel mode

lib/compress/zstd_opt.c

index 04587e855aa85b0b5f987dcce92054dea3c9ff6e..20a30406a319a182f48f0253d4abb8b139b39ad3 100644 (file)
@@ -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;