diff options
author | tb <> | 2018-02-20 21:11:15 +0000 |
---|---|---|
committer | tb <> | 2018-02-20 21:11:15 +0000 |
commit | 9cd4599a3e4ae3b0d35abe9357e4bf7609264050 (patch) | |
tree | 13e1873aa65d5d4f03e2462d075e5c6f740fefdf /src | |
parent | 124399b1ef74fcd5c9b850055adba5c40f2719d0 (diff) | |
download | openbsd-9cd4599a3e4ae3b0d35abe9357e4bf7609264050.tar.gz openbsd-9cd4599a3e4ae3b0d35abe9357e4bf7609264050.tar.bz2 openbsd-9cd4599a3e4ae3b0d35abe9357e4bf7609264050.zip |
Fix bogus check. Spotted by brynet, thanks.
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dh/dh_lib.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c index 856d32c1b6..638b3a18fc 100644 --- a/src/lib/libcrypto/dh/dh_lib.c +++ b/src/lib/libcrypto/dh/dh_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_lib.c,v 1.28 2018/02/20 18:01:42 tb Exp $ */ | 1 | /* $OpenBSD: dh_lib.c,v 1.29 2018/02/20 21:11:15 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 | * |
@@ -330,6 +330,8 @@ int | |||
330 | DH_set_length(DH *dh, long length) | 330 | DH_set_length(DH *dh, long length) |
331 | { | 331 | { |
332 | if (length < 0 || length > INT_MAX) | 332 | if (length < 0 || length > INT_MAX) |
333 | dh->length = length; | 333 | return 0; |
334 | |||
335 | dh->length = length; | ||
334 | return 1; | 336 | return 1; |
335 | } | 337 | } |