diff options
| author | Gary Ching-Pang Lin <glin@suse.com> | 2014-07-14 09:03:36 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2014-07-14 09:03:36 -0400 |
| commit | f9368474dd80b630adf745314b0336c16a35b0ad (patch) | |
| tree | b82d269a6f732af91e6b599003888d8b10a13bf2 /Cryptlib/OpenSSL/crypto/bn/bn_word.c | |
| parent | 875eb1b9d501d853b2c44f86a32a51b59f85eef9 (diff) | |
| download | efi-boot-shim-f9368474dd80b630adf745314b0336c16a35b0ad.tar.gz efi-boot-shim-f9368474dd80b630adf745314b0336c16a35b0ad.zip | |
Update openssl to 0.9.8za
Also update to Tiano Cryptlib r15638
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/bn/bn_word.c')
| -rwxr-xr-x | Cryptlib/OpenSSL/crypto/bn/bn_word.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/Cryptlib/OpenSSL/crypto/bn/bn_word.c b/Cryptlib/OpenSSL/crypto/bn/bn_word.c index ee7b87c4..de83a15b 100755 --- a/Cryptlib/OpenSSL/crypto/bn/bn_word.c +++ b/Cryptlib/OpenSSL/crypto/bn/bn_word.c @@ -144,26 +144,17 @@ int BN_add_word(BIGNUM *a, BN_ULONG w) a->neg=!(a->neg); return(i); } - /* Only expand (and risk failing) if it's possibly necessary */ - if (((BN_ULONG)(a->d[a->top - 1] + 1) == 0) && - (bn_wexpand(a,a->top+1) == NULL)) - return(0); - i=0; - for (;;) + for (i=0;w!=0 && i<a->top;i++) { - if (i >= a->top) - l=w; - else - l=(a->d[i]+w)&BN_MASK2; - a->d[i]=l; - if (w > l) - w=1; - else - break; - i++; + a->d[i] = l = (a->d[i]+w)&BN_MASK2; + w = (w>l)?1:0; } - if (i >= a->top) + if (w && i==a->top) + { + if (bn_wexpand(a,a->top+1) == NULL) return 0; a->top++; + a->d[i]=w; + } bn_check_top(a); return(1); } |
