summaryrefslogtreecommitdiff
path: root/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
blob: c97d88c1d091b886b93198b66ea78e74842bec32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- grub-1.98.orig/lib/libgcrypt-grub/cipher/primegen.c	2010-03-06 21:52:26.000000000 +0100
+++ grub-1.98/lib/libgcrypt-grub/cipher/primegen.c	2010-06-26 20:42:06.831276628 +0200
@@ -1478,7 +1478,7 @@ _gcry_generate_fips186_2_prime (unsigned
         }
       
       /* Step 2: U = sha1(seed) ^ sha1((seed+1) mod 2^{qbits})  */
-      memcpy (seed_plus, seed, seedlen);
+      grub_memcpy (seed_plus, seed, seedlen);
       for (i=seedlen-1; i >= 0; i--)
         {
           seed_plus[i]++;
@@ -1596,7 +1596,7 @@ _gcry_generate_fips186_2_prime (unsigned
     *r_counter = counter;
   if (r_seed && r_seedlen)
     {
-      memcpy (seed_plus, seed, seedlen);
+      grub_memcpy (seed_plus, seed, seedlen);
       *r_seed = seed_plus;
       seed_plus = NULL;
       *r_seedlen = seedlen;
@@ -1751,7 +1751,7 @@ _gcry_generate_fips186_3_prime (unsigned
   
   /* Step 11.  Note that we do no use an explicit offset but increment
      SEED_PLUS accordingly.  */
-  memcpy (seed_plus, seed, seedlen);
+  grub_memcpy (seed_plus, seed, seedlen);
   counter = 0;
 
   /* Generate P. */
@@ -1838,7 +1838,7 @@ _gcry_generate_fips186_3_prime (unsigned
     *r_counter = counter;
   if (r_seed && r_seedlen)
     {
-      memcpy (seed_plus, seed, seedlen);
+      grub_memcpy (seed_plus, seed, seedlen);
       *r_seed = seed_plus;
       seed_plus = NULL;
       *r_seedlen = seedlen;