summaryrefslogtreecommitdiff
path: root/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c')
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
new file mode 100644
index 000000000..c97d88c1d
--- /dev/null
+++ b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_primegen_c
@@ -0,0 +1,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;