diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2001-06-22 00:03:45 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2001-06-22 00:03:45 +0000 |
commit | 642a4bcb90082ea29d17ec26cf3bf24f137f6d78 (patch) | |
tree | 7bfd115a4edcd10efea47366faf8014148d5dbf2 /lib/libcrypto/bn/bn_shift.c | |
parent | a53ec830979e8b3c974a48b5486fe532177cde14 (diff) |
openssl-engine-0.9.6a merge
Diffstat (limited to 'lib/libcrypto/bn/bn_shift.c')
-rw-r--r-- | lib/libcrypto/bn/bn_shift.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libcrypto/bn/bn_shift.c b/lib/libcrypto/bn/bn_shift.c index 0883247384e..c2608f9f4a9 100644 --- a/lib/libcrypto/bn/bn_shift.c +++ b/lib/libcrypto/bn/bn_shift.c @@ -172,6 +172,11 @@ int BN_rshift(BIGNUM *r, BIGNUM *a, int n) r->neg=a->neg; if (bn_wexpand(r,a->top-nw+1) == NULL) return(0); } + else + { + if (n == 0) + return 1; /* or the copying loop will go berserk */ + } f= &(a->d[nw]); t=r->d; |