From: Alessandro Ghedini Date: Fri, 2 Oct 2015 13:16:08 +0000 (+0200) Subject: Do not treat 0 return value from BIO_get_fd() as error X-Git-Tag: OpenSSL_1_1_0-pre1~394 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4428c7dba8f6f407d915c1226f4e0f673e8be241;p=openssl Do not treat 0 return value from BIO_get_fd() as error 0 is a valid file descriptor. RT#4068 Reviewed-by: Rich Salz Reviewed-by: Richard Levitte --- diff --git a/apps/ocsp.c b/apps/ocsp.c index 2ef42789e6..c599ffbd4f 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -1202,7 +1202,7 @@ static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host, return NULL; } - if (BIO_get_fd(cbio, &fd) <= 0) { + if (BIO_get_fd(cbio, &fd) < 0) { BIO_puts(bio_err, "Can't get connection fd\n"); goto err; }