summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2017-02-15 14:56:42 +0000
committerjsing <jsing@openbsd.org>2017-02-15 14:56:42 +0000
commitbd3346f2cc93c252e96e3a54f7c7eba2311e3ac6 (patch)
tree0eec97b07dcae5f92680a3420c0b491497b25390 /lib/libssl/ssl_lib.c
parentAlign mutex IPL with the interrupt handler's priority. (diff)
downloadwireguard-openbsd-bd3346f2cc93c252e96e3a54f7c7eba2311e3ac6.tar.xz
wireguard-openbsd-bd3346f2cc93c252e96e3a54f7c7eba2311e3ac6.zip
Avoid dereferencing a pointer when reporting an error about the same
pointer being NULL. Found by jsg@ with cppcheck; also detected by Coverity.
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r--lib/libssl/ssl_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index 7e752ae0d0e..65b26209b8e 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.156 2017/02/07 02:08:38 beck Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.157 2017/02/15 14:56:42 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -886,7 +886,7 @@ int
SSL_check_private_key(const SSL *ssl)
{
if (ssl == NULL) {
- SSLerror(ssl, ERR_R_PASSED_NULL_PARAMETER);
+ SSLerrorx(ERR_R_PASSED_NULL_PARAMETER);
return (0);
}
if (ssl->cert == NULL) {