diff options
author | doug <> | 2015-07-20 18:31:01 +0000 |
---|---|---|
committer | doug <> | 2015-07-20 18:31:01 +0000 |
commit | 4ab5d1a3a938b0f6aac4adfd45266ea9421ad4f5 (patch) | |
tree | 346217d2a20ed9d9d3d92681de9fa6e006eaca8d | |
parent | d43868803f4819bd2369eda390f010284b476c3f (diff) | |
download | openbsd-4ab5d1a3a938b0f6aac4adfd45266ea9421ad4f5.tar.gz openbsd-4ab5d1a3a938b0f6aac4adfd45266ea9421ad4f5.tar.bz2 openbsd-4ab5d1a3a938b0f6aac4adfd45266ea9421ad4f5.zip |
Avoid possible NULL deref in openssl(1) s_server.
Fixes Coverity issue 78873.
ok miod@
-rw-r--r-- | src/usr.bin/openssl/s_server.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/s_server.c b/src/usr.bin/openssl/s_server.c index 2422642989..317b1a849f 100644 --- a/src/usr.bin/openssl/s_server.c +++ b/src/usr.bin/openssl/s_server.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s_server.c,v 1.13 2015/07/17 16:09:46 doug Exp $ */ | 1 | /* $OpenBSD: s_server.c,v 1.14 2015/07/20 18:31:01 doug 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 | * |
@@ -1132,7 +1132,10 @@ bad: | |||
1132 | 1132 | ||
1133 | if (ctx2) { | 1133 | if (ctx2) { |
1134 | if (!dhfile) { | 1134 | if (!dhfile) { |
1135 | DH *dh2 = load_dh_param(s_cert_file2); | 1135 | DH *dh2 = NULL; |
1136 | |||
1137 | if (s_cert_file2 != NULL) | ||
1138 | dh2 = load_dh_param(s_cert_file2); | ||
1136 | if (dh2 != NULL) { | 1139 | if (dh2 != NULL) { |
1137 | BIO_printf(bio_s_out, "Setting temp DH parameters\n"); | 1140 | BIO_printf(bio_s_out, "Setting temp DH parameters\n"); |
1138 | (void) BIO_flush(bio_s_out); | 1141 | (void) BIO_flush(bio_s_out); |