diff options
author | deraadt <> | 2015-10-03 03:39:19 +0000 |
---|---|---|
committer | deraadt <> | 2015-10-03 03:39:19 +0000 |
commit | a745090733b8c302e7597048b28fe80c14240608 (patch) | |
tree | 53624d2e14d90c8a1aa78de58cb87d0ed4fbc19d | |
parent | ef82ec6f879a46c60bcda5eff16529f9fd6b2262 (diff) | |
download | openbsd-a745090733b8c302e7597048b28fe80c14240608.tar.gz openbsd-a745090733b8c302e7597048b28fe80c14240608.tar.bz2 openbsd-a745090733b8c302e7597048b28fe80c14240608.zip |
BIO_get_fd() could return fd 0; fix error condition. Found at
http://marc.info/?l=openssl-dev&m=144374015404899&w=2
ok doug
-rw-r--r-- | src/usr.bin/openssl/ocsp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr.bin/openssl/ocsp.c b/src/usr.bin/openssl/ocsp.c index 39000328b6..3a6ac36b1e 100644 --- a/src/usr.bin/openssl/ocsp.c +++ b/src/usr.bin/openssl/ocsp.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ocsp.c,v 1.4 2015/09/11 14:30:23 bcook Exp $ */ | 1 | /* $OpenBSD: ocsp.c,v 1.5 2015/10/03 03:39:19 deraadt Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -1110,7 +1110,7 @@ query_responder(BIO * err, BIO * cbio, char *path, | |||
1110 | BIO_puts(err, "Error connecting BIO\n"); | 1110 | BIO_puts(err, "Error connecting BIO\n"); |
1111 | return NULL; | 1111 | return NULL; |
1112 | } | 1112 | } |
1113 | if (BIO_get_fd(cbio, &fd) <= 0) { | 1113 | if (BIO_get_fd(cbio, &fd) < 0) { |
1114 | BIO_puts(err, "Can't get connection fd\n"); | 1114 | BIO_puts(err, "Can't get connection fd\n"); |
1115 | goto err; | 1115 | goto err; |
1116 | } | 1116 | } |