diff options
| author | tb <> | 2018-11-06 06:49:45 +0000 |
|---|---|---|
| committer | tb <> | 2018-11-06 06:49:45 +0000 |
| commit | a8249222cfc2738a9d25e498cd781c3b188cb9e0 (patch) | |
| tree | 8e61ccd5c512d90c339210feefd00c2ac5a5169e /src/lib/libc | |
| parent | 679dc6b90c8feeed588e2976db3dcdc939b5dd27 (diff) | |
| download | openbsd-a8249222cfc2738a9d25e498cd781c3b188cb9e0.tar.gz openbsd-a8249222cfc2738a9d25e498cd781c3b188cb9e0.tar.bz2 openbsd-a8249222cfc2738a9d25e498cd781c3b188cb9e0.zip | |
Flip reversed test in bn_rand_interval().
ok jsing
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_rand.c b/src/lib/libcrypto/bn/bn_rand.c index 63b8af8b95..df798f41bc 100644 --- a/src/lib/libcrypto/bn/bn_rand.c +++ b/src/lib/libcrypto/bn/bn_rand.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_rand.c,v 1.21 2018/11/05 23:52:47 tb Exp $ */ | 1 | /* $OpenBSD: bn_rand.c,v 1.22 2018/11/06 06:49:45 tb 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 | * |
| @@ -285,7 +285,7 @@ bn_rand_interval(BIGNUM *rnd, const BIGNUM *lower_inc, const BIGNUM *upper_exc) | |||
| 285 | BIGNUM *len = NULL; | 285 | BIGNUM *len = NULL; |
| 286 | int ret = 0; | 286 | int ret = 0; |
| 287 | 287 | ||
| 288 | if (BN_cmp(lower_inc, upper_exc) <= 0) | 288 | if (BN_cmp(lower_inc, upper_exc) >= 0) |
| 289 | goto err; | 289 | goto err; |
| 290 | 290 | ||
| 291 | if ((len = BN_new()) == NULL) | 291 | if ((len = BN_new()) == NULL) |
