Remove the atk*.def file.
[fedora-mingw.git] / openssl / openssl-0.9.8g-bn-mul-bug.patch
1 openssl/crypto/bn/bn_mul.c     1.36.2.1 -> 1.36.2.2
2
3 --- openssl/crypto/bn/bn_mul.c 2007/07/08 18:54:30 1.36.2.1
4 +++ openssl/crypto/bn/bn_mul.c 2007/11/03 20:09:29 1.36.2.2
5 @@ -389,6 +389,7 @@
6   * a[0]*b[0]+a[1]*b[1]+(a[0]-a[1])*(b[1]-b[0])
7   * a[1]*b[1]
8   */
9 +/* dnX may not be positive, but n2/2+dnX has to be */
10  void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2,
11         int dna, int dnb, BN_ULONG *t)
12         {
13 @@ -398,7 +399,7 @@
14         BN_ULONG ln,lo,*p;
15  
16  # ifdef BN_COUNT
17 -       fprintf(stderr," bn_mul_recursive %d * %d\n",n2,n2);
18 +       fprintf(stderr," bn_mul_recursive %d%+d * %d%+d\n",n2,dna,n2,dnb);
19  # endif
20  # ifdef BN_MUL_COMBA
21  #  if 0
22 @@ -545,6 +546,7 @@
23  
24  /* n+tn is the word length
25   * t needs to be n*4 is size, as does r */
26 +/* tnX may not be negative but less than n */
27  void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n,
28              int tna, int tnb, BN_ULONG *t)
29         {
30 @@ -553,8 +555,8 @@
31         BN_ULONG ln,lo,*p;
32  
33  # ifdef BN_COUNT
34 -       fprintf(stderr," bn_mul_part_recursive (%d+%d) * (%d+%d)\n",
35 -               tna, n, tnb, n);
36 +       fprintf(stderr," bn_mul_part_recursive (%d%+d) * (%d%+d)\n",
37 +               n, tna, n, tnb);
38  # endif
39         if (n < 8)
40                 {
41 @@ -655,16 +657,19 @@
42                                 for (;;)
43                                         {
44                                         i/=2;
45 -                                       if (i <= tna && tna == tnb)
46 +                                       /* these simplified conditions work
47 +                                        * exclusively because difference
48 +                                        * between tna and tnb is 1 or 0 */
49 +                                       if (i < tna || i < tnb)
50                                                 {
51 -                                               bn_mul_recursive(&(r[n2]),
52 +                                               bn_mul_part_recursive(&(r[n2]),
53                                                         &(a[n]),&(b[n]),
54                                                         i,tna-i,tnb-i,p);
55                                                 break;
56                                                 }
57 -                                       else if (i < tna || i < tnb)
58 +                                       else if (i == tna || i == tnb)
59                                                 {
60 -                                               bn_mul_part_recursive(&(r[n2]),
61 +                                               bn_mul_recursive(&(r[n2]),
62                                                         &(a[n]),&(b[n]),
63                                                         i,tna-i,tnb-i,p);
64                                                 break;