Commit 8acaabec authored by Alessandro Ghedini's avatar Alessandro Ghedini Committed by Richard Levitte
Browse files

Replace malloc+strlcpy with strdup

parent 4428c7db
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -223,12 +223,11 @@ static int def_load_bio(CONF *conf, BIO *in, long *line)
        goto err;
        goto err;
    }
    }


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


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