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