Ignore:
Timestamp:
Aug 7, 2014, 8:25:37 PM (11 years ago)
Author:
dmik
Message:

openssl: Merge version 1.0.0n from vendor to trunk.

Location:
openssl/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • openssl/trunk

  • TabularUnified openssl/trunk/crypto/bn/bn_word.c

    r150 r808  
    145145                return(i);
    146146                }
    147         /* Only expand (and risk failing) if it's possibly necessary */
    148         if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) &&
    149                         (bn_wexpand(a,a->top+1) == NULL))
    150                 return(0);
    151         i=0;
    152         for (;;)
    153                 {
    154                 if (i >= a->top)
    155                         l=w;
    156                 else
    157                         l=(a->d[i]+w)&BN_MASK2;
    158                 a->d[i]=l;
    159                 if (w > l)
    160                         w=1;
    161                 else
    162                         break;
    163                 i++;
    164                 }
    165         if (i >= a->top)
     147        for (i=0;w!=0 && i<a->top;i++)
     148                {
     149                a->d[i] = l = (a->d[i]+w)&BN_MASK2;
     150                w = (w>l)?1:0;
     151                }
     152        if (w && i==a->top)
     153                {
     154                if (bn_wexpand(a,a->top+1) == NULL) return 0;
    166155                a->top++;
     156                a->d[i]=w;
     157                }
    167158        bn_check_top(a);
    168159        return(1);
Note: See TracChangeset for help on using the changeset viewer.