提交 4428c7db 编写于 作者: A Alessandro Ghedini 提交者: Richard Levitte

Do not treat 0 return value from BIO_get_fd() as error

0 is a valid file descriptor.

RT#4068
Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 dad0b512
...@@ -1202,7 +1202,7 @@ static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host, ...@@ -1202,7 +1202,7 @@ static OCSP_RESPONSE *query_responder(BIO *cbio, const char *host,
return NULL; 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"); BIO_puts(bio_err, "Can't get connection fd\n");
goto err; goto err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册