1
0

patch-lib_libgcrypt-grub_cipher_dsa_c 1.2 KB

1234567891011121314151617181920212223242526272829
  1. --- grub-1.98.orig/lib/libgcrypt-grub/cipher/dsa.c 2010-03-06 21:52:26.000000000 +0100
  2. +++ grub-1.98/lib/libgcrypt-grub/cipher/dsa.c 2010-06-26 20:41:13.511279436 +0200
  3. @@ -157,7 +157,7 @@ gen_k( gcry_mpi_t q )
  4. to get_random_bytes() and use this the here maybe it is
  5. easier to do this directly in random.c. */
  6. char *pp = gcry_random_bytes_secure( 4, GCRY_STRONG_RANDOM );
  7. - memcpy( rndbuf,pp, 4 );
  8. + grub_memcpy( rndbuf,pp, 4 );
  9. gcry_free(pp);
  10. }
  11. _gcry_mpi_set_buffer( k, rndbuf, nbytes, 0 );
  12. @@ -337,7 +337,7 @@ generate (DSA_secret_key *sk, unsigned i
  13. else
  14. { /* Change only some of the higher bits (= 2 bytes)*/
  15. char *r = gcry_random_bytes_secure (2, random_level);
  16. - memcpy(rndbuf, r, 2 );
  17. + grub_memcpy(rndbuf, r, 2 );
  18. gcry_free(r);
  19. }
  20. @@ -713,7 +713,7 @@ dsa_generate_ext (int algo, unsigned int
  21. gcry_sexp_release (l1);
  22. return GPG_ERR_INV_OBJ; /* No value or value too large. */
  23. }
  24. - memcpy (buf, s, n);
  25. + grub_memcpy (buf, s, n);
  26. buf[n] = 0;
  27. qbits = (unsigned int)strtoul (buf, NULL, 0);
  28. gcry_sexp_release (l1);