projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bfb4db
)
Don't let top go below zero!
author
Ben Laurie
<ben@openssl.org>
Sat, 1 Jul 2000 16:30:27 +0000
(16:30 +0000)
committer
Ben Laurie
<ben@openssl.org>
Sat, 1 Jul 2000 16:30:27 +0000
(16:30 +0000)
crypto/bn/bn_mont.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_mont.c
b/crypto/bn/bn_mont.c
index e5fbcd619f7b05ce078565c7cdb67027916af7de..6a54e8f4cf843a67bbeaea6db0292c37113d7307 100644
(file)
--- a/
crypto/bn/bn_mont.c
+++ b/
crypto/bn/bn_mont.c
@@
-90,7
+90,7
@@
int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b,
bn_wexpand(tmp2,a->top*4);
bn_sqr_recursive(tmp->d,a->d,a->top,tmp2->d);
tmp->top=a->top*2;
- if (tmp->d[tmp->top-1] == 0)
+ if (tmp->
top > 0 && tmp->
d[tmp->top-1] == 0)
tmp->top--;
#else
if (!BN_sqr(tmp,a,ctx)) goto err;