summaryrefslogtreecommitdiff
path: root/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
diff options
context:
space:
mode:
Diffstat (limited to 'package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c')
-rw-r--r--package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c29
1 files changed, 29 insertions, 0 deletions
diff --git a/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
new file mode 100644
index 000000000..91b467779
--- /dev/null
+++ b/package/grub/patches/patch-lib_libgcrypt-grub_cipher_dsa_c
@@ -0,0 +1,29 @@
+--- grub-1.98.orig/lib/libgcrypt-grub/cipher/dsa.c 2010-03-06 21:52:26.000000000 +0100
++++ grub-1.98/lib/libgcrypt-grub/cipher/dsa.c 2010-06-26 20:41:13.511279436 +0200
+@@ -157,7 +157,7 @@ gen_k( gcry_mpi_t q )
+ to get_random_bytes() and use this the here maybe it is
+ easier to do this directly in random.c. */
+ char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
+- memcpy( rndbuf,pp, 4 );
++ grub_memcpy( rndbuf,pp, 4 );
+ gcry_free(pp);
+ }
+ _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
+@@ -337,7 +337,7 @@ generate (DSA_secret_key *sk, unsigned i
+ else
+ { /* Change only some of the higher bits (= 2 bytes)*/
+ char *r = gcry_random_bytes_secure (2, random_level);
+- memcpy(rndbuf, r, 2 );
++ grub_memcpy(rndbuf, r, 2 );
+ gcry_free(r);
+ }
+
+@@ -713,7 +713,7 @@ dsa_generate_ext (int algo, unsigned int
+ gcry_sexp_release (l1);
+ return GPG_ERR_INV_OBJ; /* No value or value too large. */
+ }
+- memcpy (buf, s, n);
++ grub_memcpy (buf, s, n);
+ buf[n] = 0;
+ qbits = (unsigned int)strtoul (buf, NULL, 0);
+ gcry_sexp_release (l1);