crypto/x509v3/v3_conf.c:301: error: UNINITIALIZED_VALUE
  The value read from ext_len was never initialized.
Showing all 1 steps of the trace


crypto/x509v3/v3_conf.c:301:5: 
299.   
300.       oct->data = ext_der;
301. >     oct->length = ext_len;
302.       ext_der = NULL;
303.   

static X509_EXTENSION *v3_generic_extension(const char *ext, char *value,
                                            int crit, int gen_type,
                                            X509V3_CTX *ctx)
{
    unsigned char *ext_der = NULL;
    long ext_len;
    ASN1_OBJECT *obj = NULL;
    ASN1_OCTET_STRING *oct = NULL;
    X509_EXTENSION *extension = NULL;
    if (!(obj = OBJ_txt2obj(ext, 0))) {
        X509V3err(X509V3_F_V3_GENERIC_EXTENSION,
                  X509V3_R_EXTENSION_NAME_ERROR);
        ERR_add_error_data(2, "name=", ext);
        goto err;
    }
    if (gen_type == 1)
        ext_der = string_to_hex(value, &ext_len);
    else if (gen_type == 2)
        ext_der = generic_asn1(value, ctx, &ext_len);
    if (ext_der == NULL) {
        X509V3err(X509V3_F_V3_GENERIC_EXTENSION,
                  X509V3_R_EXTENSION_VALUE_ERROR);
        ERR_add_error_data(2, "value=", value);
        goto err;
    }
    if (!(oct = M_ASN1_OCTET_STRING_new())) {
        X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE);
        goto err;
    }
    oct->data = ext_der;
    oct->length = ext_len;
    ext_der = NULL;
    extension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct);
 err:
    ASN1_OBJECT_free(obj);
    M_ASN1_OCTET_STRING_free(oct);
    if (ext_der)
        OPENSSL_free(ext_der);
    return extension;
}
['static X509_EXTENSION *v3_generic_extension(const char *ext, char *value,\n                                            int crit, int gen_type,\n                                            X509V3_CTX *ctx)\n{\n    unsigned char *ext_der = NULL;\n    long ext_len;\n    ASN1_OBJECT *obj = NULL;\n    ASN1_OCTET_STRING *oct = NULL;\n    X509_EXTENSION *extension = NULL;\n    if (!(obj = OBJ_txt2obj(ext, 0))) {\n        X509V3err(X509V3_F_V3_GENERIC_EXTENSION,\n                  X509V3_R_EXTENSION_NAME_ERROR);\n        ERR_add_error_data(2, "name=", ext);\n        goto err;\n    }\n    if (gen_type == 1)\n        ext_der = string_to_hex(value, &ext_len);\n    else if (gen_type == 2)\n        ext_der = generic_asn1(value, ctx, &ext_len);\n    if (ext_der == NULL) {\n        X509V3err(X509V3_F_V3_GENERIC_EXTENSION,\n                  X509V3_R_EXTENSION_VALUE_ERROR);\n        ERR_add_error_data(2, "value=", value);\n        goto err;\n    }\n    if (!(oct = M_ASN1_OCTET_STRING_new())) {\n        X509V3err(X509V3_F_V3_GENERIC_EXTENSION, ERR_R_MALLOC_FAILURE);\n        goto err;\n    }\n    oct->data = ext_der;\n    oct->length = ext_len;\n    ext_der = NULL;\n    extension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct);\n err:\n    ASN1_OBJECT_free(obj);\n    M_ASN1_OCTET_STRING_free(oct);\n    if (ext_der)\n        OPENSSL_free(ext_der);\n    return extension;\n}']