Commit 5a1e6b13 authored by Alessandro Ghedini's avatar Alessandro Ghedini Committed by Richard Levitte
Browse files

Replace malloc+strlcpy with strdup



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
Reviewed-by: default avatarRichard Levitte <levitte@openssl.org>
(cherry picked from commit 8acaabec)
parent 51a1cc4f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -225,12 +225,11 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
        goto err;
    }

    section = (char *)OPENSSL_malloc(10);
    section = BUF_strdup("default");
    if (section == NULL) {
        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
        goto err;
    }
    BUF_strlcpy(section, "default", 10);

    if (_CONF_new_data(conf) == 0) {
        CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);