From df94debe54462b28ed0cf3c46f72c9bfc375b619 Mon Sep 17 00:00:00 2001 From: tb <> Date: Tue, 6 Nov 2018 06:49:45 +0000 Subject: Flip reversed test in bn_rand_interval(). ok jsing --- src/lib/libcrypto/bn/bn_rand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 @@ -/* $OpenBSD: bn_rand.c,v 1.21 2018/11/05 23:52:47 tb Exp $ */ +/* $OpenBSD: bn_rand.c,v 1.22 2018/11/06 06:49:45 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -285,7 +285,7 @@ bn_rand_interval(BIGNUM *rnd, const BIGNUM *lower_inc, const BIGNUM *upper_exc) BIGNUM *len = NULL; int ret = 0; - if (BN_cmp(lower_inc, upper_exc) <= 0) + if (BN_cmp(lower_inc, upper_exc) >= 0) goto err; if ((len = BN_new()) == NULL) -- cgit v1.2.3-55-g6feb