summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2018-11-06 06:49:45 +0000
committertb <>2018-11-06 06:49:45 +0000
commitdf94debe54462b28ed0cf3c46f72c9bfc375b619 (patch)
tree8e61ccd5c512d90c339210feefd00c2ac5a5169e /src
parent8f41a800a668b426c53024ff8a97e96e0b98f285 (diff)
downloadopenbsd-df94debe54462b28ed0cf3c46f72c9bfc375b619.tar.gz
openbsd-df94debe54462b28ed0cf3c46f72c9bfc375b619.tar.bz2
openbsd-df94debe54462b28ed0cf3c46f72c9bfc375b619.zip
Flip reversed test in bn_rand_interval().
ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_rand.c4
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)