diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_lib.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_lib.c b/src/lib/libcrypto/bn/bn_lib.c index 0ac3977c19..df43da5db6 100644 --- a/src/lib/libcrypto/bn/bn_lib.c +++ b/src/lib/libcrypto/bn/bn_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_lib.c,v 1.64 2022/11/30 01:47:19 jsing Exp $ */ | 1 | /* $OpenBSD: bn_lib.c,v 1.65 2022/11/30 02:52:25 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -691,9 +691,11 @@ BN_ucmp(const BIGNUM *a, const BIGNUM *b) | |||
| 691 | BN_ULONG t1, t2, *ap, *bp; | 691 | BN_ULONG t1, t2, *ap, *bp; |
| 692 | 692 | ||
| 693 | 693 | ||
| 694 | i = a->top - b->top; | 694 | if (a->top < b->top) |
| 695 | if (i != 0) | 695 | return -1; |
| 696 | return (i); | 696 | if (a->top > b->top) |
| 697 | return 1; | ||
| 698 | |||
| 697 | ap = a->d; | 699 | ap = a->d; |
| 698 | bp = b->d; | 700 | bp = b->d; |
| 699 | for (i = a->top - 1; i >= 0; i--) { | 701 | for (i = a->top - 1; i >= 0; i--) { |
