Commit 138388fe authored by Matt Caswell's avatar Matt Caswell
Browse files

Check for failed malloc in BIO_ADDR_new



BIO_ADDR_new() calls OPENSSL_zalloc() which can fail - but the return
value is not checked.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent ed3eb5e0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ BIO_ADDR *BIO_ADDR_new(void)
{
    BIO_ADDR *ret = OPENSSL_zalloc(sizeof(*ret));

    if (ret == NULL)
        return NULL;

    ret->sa.sa_family = AF_UNSPEC;
    return ret;
}