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


crypto/x509v3/v3_conf.c:294:2: 
292.   
293.   	oct->data = ext_der;
294. > 	oct->length = ext_len;
295.   	ext_der = NULL;
296.   

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\t     int crit, int gen_type, X509V3_CTX *ctx)\n\t{\n\tunsigned char *ext_der=NULL;\n\tlong ext_len;\n\tASN1_OBJECT *obj=NULL;\n\tASN1_OCTET_STRING *oct=NULL;\n\tX509_EXTENSION *extension=NULL;\n\tif (!(obj = OBJ_txt2obj(ext, 0)))\n\t\t{\n\t\tX509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_NAME_ERROR);\n\t\tERR_add_error_data(2, "name=", ext);\n\t\tgoto err;\n\t\t}\n\tif (gen_type == 1)\n\t\text_der = string_to_hex(value, &ext_len);\n\telse if (gen_type == 2)\n\t\text_der = generic_asn1(value, ctx, &ext_len);\n\tif (ext_der == NULL)\n\t\t{\n\t\tX509V3err(X509V3_F_V3_GENERIC_EXTENSION,X509V3_R_EXTENSION_VALUE_ERROR);\n\t\tERR_add_error_data(2, "value=", value);\n\t\tgoto err;\n\t\t}\n\tif (!(oct = M_ASN1_OCTET_STRING_new()))\n\t\t{\n\t\tX509V3err(X509V3_F_V3_GENERIC_EXTENSION,ERR_R_MALLOC_FAILURE);\n\t\tgoto err;\n\t\t}\n\toct->data = ext_der;\n\toct->length = ext_len;\n\text_der = NULL;\n\textension = X509_EXTENSION_create_by_OBJ(NULL, obj, crit, oct);\n\terr:\n\tASN1_OBJECT_free(obj);\n\tM_ASN1_OCTET_STRING_free(oct);\n\tif(ext_der) OPENSSL_free(ext_der);\n\treturn extension;\n\t}']