]> git.pld-linux.org Git - packages/cryptsetup.git/blob - diet.patch
- tests bcond desc
[packages/cryptsetup.git] / diet.patch
1 --- cryptsetup-1.2.0/lib/luks1/pbkdf.c~ 2009-09-11 16:11:50.000000000 +0200
2 +++ cryptsetup-1.2.0/lib/luks1/pbkdf.c  2010-06-21 11:16:57.353421474 +0200
3 @@ -174,7 +174,7 @@
4         if (gcry_md_setkey(prf, P, Plen))
5                 goto out;
6  
7 -       for (i = 1; (uint) i <= l; i++) {
8 +       for (i = 1; (unsigned int) i <= l; i++) {
9                 memset(T, 0, hLen);
10  
11                 for (u = 1; u <= c ; u++) {
12 @@ -198,7 +198,7 @@
13  
14                         memcpy(U, p, hLen);
15  
16 -                       for (k = 0; (uint) k < hLen; k++)
17 +                       for (k = 0; (unsigned int) k < hLen; k++)
18                                 T[k] ^= U[k];
19  
20                         if (perfcheck && __PBKDF2_performance) {
21 @@ -210,7 +210,7 @@
22                                 __PBKDF2_global_j++;
23                 }
24  
25 -               memcpy(DK + (i - 1) * hLen, T, (uint) i == l ? r : hLen);
26 +               memcpy(DK + (i - 1) * hLen, T, (unsigned int) i == l ? r : hLen);
27         }
28         rc = 0;
29  out:
30 --- cryptsetup-1.5.1/lib/luks1/keymanage.c.orig 2012-09-19 13:55:25.000000000 +0200
31 +++ cryptsetup-1.5.1/lib/luks1/keymanage.c      2012-10-27 10:40:19.872153257 +0200
32 @@ -20,6 +20,7 @@
33  
34  #include <sys/types.h>
35  #include <sys/stat.h>
36 +#include <limits.h>
37  #include <netinet/in.h>
38  #include <fcntl.h>
39  #include <errno.h>
40 @@ -36,6 +37,10 @@
41  #include "pbkdf.h"
42  #include "internal.h"
43  
44 +#ifndef UINT32_MAX
45 +#define UINT32_MAX UINT_MAX
46 +#endif
47 +
48  /* Get size of struct luks_phdr with all keyslots material space */
49  static size_t LUKS_device_sectors(size_t keyLen)
50  {
This page took 0.065176 seconds and 3 git commands to generate.