]> granicus.if.org Git - openssl/commitdiff
Do not treat 0 return value from BIO_get_fd() as error
authorAlessandro Ghedini <alessandro@ghedini.me>
Fri, 2 Oct 2015 13:16:08 +0000 (15:16 +0200)
committerRichard Levitte <levitte@openssl.org>
Fri, 23 Oct 2015 17:52:08 +0000 (19:52 +0200)
0 is a valid file descriptor.

RT#4068

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
apps/ocsp.c

index 2ef42789e6eb8cfbdfbcd419a886d37bf9ef4c48..c599ffbd4f59cde611f279620e96db02cb143d65 100644 (file)
@@ -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;
     }