From 6a3dd58678b3dcd2bb40d4b0d9965c786d10342a Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Fri, 2 Oct 2015 15:16:08 +0200 Subject: [PATCH] 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 (cherry picked from commit 4428c7dba8f6f407d915c1226f4e0f673e8be241) --- apps/ocsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/ocsp.c b/apps/ocsp.c index 572f0643e1..9fd9568825 100644 --- a/apps/ocsp.c +++ b/apps/ocsp.c @@ -1220,8 +1220,8 @@ static OCSP_RESPONSE *query_responder(BIO *err, BIO *cbio, char *path, return NULL; } - if (BIO_get_fd(cbio, &fd) <= 0) { - BIO_puts(err, "Can't get connection fd\n"); + if (BIO_get_fd(cbio, &fd) < 0) { + BIO_puts(bio_err, "Can't get connection fd\n"); goto err; } -- 2.34.1