Commit 6a3dd586 authored by Alessandro Ghedini's avatar Alessandro Ghedini Committed by Richard Levitte
Browse files

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



0 is a valid file descriptor.

RT#4068

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(cherry picked from commit 4428c7db)
parent 2d404dc3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
    }