diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 3 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/bn/bn_lib.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 463463cfcb..5e530d9474 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c | |||
@@ -702,6 +702,9 @@ int BN_cmp(const BIGNUM *a, const BIGNUM *b) | |||
702 | { gt=1; lt= -1; } | 702 | { gt=1; lt= -1; } |
703 | else { gt= -1; lt=1; } | 703 | else { gt= -1; lt=1; } |
704 | 704 | ||
705 | bn_fix_top(a); | ||
706 | bn_fix_top(b); | ||
707 | |||
705 | if (a->top > b->top) return(gt); | 708 | if (a->top > b->top) return(gt); |
706 | if (a->top < b->top) return(lt); | 709 | if (a->top < b->top) return(lt); |
707 | for (i=a->top-1; i>=0; i--) | 710 | for (i=a->top-1; i>=0; i--) |
diff --git a/src/lib/libssl/src/crypto/bn/bn_lib.c b/src/lib/libssl/src/crypto/bn/bn_lib.c index 463463cfcb..5e530d9474 100644 --- a/src/lib/libssl/src/crypto/bn/bn_lib.c +++ b/src/lib/libssl/src/crypto/bn/bn_lib.c | |||
@@ -702,6 +702,9 @@ int BN_cmp(const BIGNUM *a, const BIGNUM *b) | |||
702 | { gt=1; lt= -1; } | 702 | { gt=1; lt= -1; } |
703 | else { gt= -1; lt=1; } | 703 | else { gt= -1; lt=1; } |
704 | 704 | ||
705 | bn_fix_top(a); | ||
706 | bn_fix_top(b); | ||
707 | |||
705 | if (a->top > b->top) return(gt); | 708 | if (a->top > b->top) return(gt); |
706 | if (a->top < b->top) return(lt); | 709 | if (a->top < b->top) return(lt); |
707 | for (i=a->top-1; i>=0; i--) | 710 | for (i=a->top-1; i>=0; i--) |