patch-lib_libgcrypt-grub_cipher_elgamal_c 937 B

1234567891011121314151617181920
  1. --- grub-1.98.orig/lib/libgcrypt-grub/cipher/elgamal.c 2010-03-06 21:52:26.000000000 +0100
  2. +++ grub-1.98/lib/libgcrypt-grub/cipher/elgamal.c 2010-06-26 20:40:56.115156639 +0200
  3. @@ -212,7 +212,7 @@ gen_k( gcry_mpi_t p, int small_k )
  4. easier to do this directly in random.c Anyway, it is
  5. highly inlikely that we will ever reach this code. */
  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. @@ -308,7 +308,7 @@ generate ( ELG_secret_key *sk, unsigned
  13. {
  14. char *r = gcry_random_bytes_secure( 2,
  15. GCRY_VERY_STRONG_RANDOM );
  16. - memcpy(rndbuf, r, 2 );
  17. + grub_memcpy(rndbuf, r, 2 );
  18. gcry_free(r);
  19. }
  20. }