diff options
author | 2018-02-20 21:11:15 +0000 | |
---|---|---|
committer | 2018-02-20 21:11:15 +0000 | |
commit | 4beaa5f5d57a489f1cf6e6e3f1ed52a7b0e5f3da (patch) | |
tree | 66c55c8aaea72445f791e9d6299420d8516c2e08 | |
parent | RSA_get_flags should be RSA_test_flags. (diff) | |
download | wireguard-openbsd-4beaa5f5d57a489f1cf6e6e3f1ed52a7b0e5f3da.tar.xz wireguard-openbsd-4beaa5f5d57a489f1cf6e6e3f1ed52a7b0e5f3da.zip |
Fix bogus check. Spotted by brynet, thanks.
-rw-r--r-- | lib/libcrypto/dh/dh_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcrypto/dh/dh_lib.c b/lib/libcrypto/dh/dh_lib.c index 856d32c1b60..638b3a18fc4 100644 --- a/lib/libcrypto/dh/dh_lib.c +++ b/lib/libcrypto/dh/dh_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_lib.c,v 1.28 2018/02/20 18:01:42 tb Exp $ */ +/* $OpenBSD: dh_lib.c,v 1.29 2018/02/20 21:11:15 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -330,6 +330,8 @@ int DH_set_length(DH *dh, long length) { if (length < 0 || length > INT_MAX) - dh->length = length; + return 0; + + dh->length = length; return 1; } |