patch-lib_libgcrypt-grub_cipher_primegen_c 1.3 KB

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