1
0

patch-lib_libgcrypt-grub_cipher_camellia_c 952 B

1234567891011121314151617181920212223242526272829
  1. --- grub-1.98.orig/lib/libgcrypt-grub/cipher/camellia.c 2010-03-06 21:52:26.000000000 +0100
  2. +++ grub-1.98/lib/libgcrypt-grub/cipher/camellia.c 2010-06-26 20:49:20.915278106 +0200
  3. @@ -26,6 +26,7 @@
  4. */
  5. +#include <grub/misc.h>
  6. #include "camellia.h"
  7. /* u32 must be 32bit word */
  8. @@ -946,13 +947,13 @@ void camellia_setup192(const unsigned ch
  9. unsigned char kk[32];
  10. u32 krll, krlr, krrl,krrr;
  11. - memcpy(kk, key, 24);
  12. - memcpy((unsigned char *)&krll, key+16,4);
  13. - memcpy((unsigned char *)&krlr, key+20,4);
  14. + grub_memcpy(kk, key, 24);
  15. + grub_memcpy((unsigned char *)&krll, key+16,4);
  16. + grub_memcpy((unsigned char *)&krlr, key+20,4);
  17. krrl = ~krll;
  18. krrr = ~krlr;
  19. - memcpy(kk+24, (unsigned char *)&krrl, 4);
  20. - memcpy(kk+28, (unsigned char *)&krrr, 4);
  21. + grub_memcpy(kk+24, (unsigned char *)&krrl, 4);
  22. + grub_memcpy(kk+28, (unsigned char *)&krrr, 4);
  23. camellia_setup256(kk, subkey);
  24. return;
  25. }