crypto/asn1/asn1_gen.c:156: error: UNINITIALIZED_VALUE
  The value read from asn1_tags.utype was never initialized.
Showing all 1 steps of the trace


crypto/asn1/asn1_gen.c:156:7: 
154.   		return NULL;
155.   
156. > 	if ((asn1_tags.utype == V_ASN1_SEQUENCE) || (asn1_tags.utype == V_ASN1_SET))
157.   		{
158.   		if (!cnf)

ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)
	{
	ASN1_TYPE *ret;
	tag_exp_arg asn1_tags;
	tag_exp_type *etmp;
	int i, len;
	unsigned char *orig_der = NULL, *new_der = NULL;
	unsigned char *cpy_start, *p;
	int cpy_len;
	long hdr_len;
	int hdr_constructed, hdr_tag, hdr_class;
	int r;
	asn1_tags.imp_tag = -1;
	asn1_tags.imp_class = -1;
	asn1_tags.format = ASN1_GEN_FORMAT_ASCII;
	asn1_tags.exp_count = 0;
	if (CONF_parse_list(str, ',', 1, asn1_cb, &asn1_tags) != 0)
		return NULL;
	if ((asn1_tags.utype == V_ASN1_SEQUENCE) || (asn1_tags.utype == V_ASN1_SET))
		{
		if (!cnf)
			{
			ASN1err(ASN1_F_ASN1_GENERATE_V3, ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG);
			return NULL;
			}
		ret = asn1_multi(asn1_tags.utype, asn1_tags.str, cnf);
		}
	else
		ret = asn1_str2type(asn1_tags.str, asn1_tags.format, asn1_tags.utype);
	if (!ret)
		return NULL;
	if ((asn1_tags.imp_tag == -1) && (asn1_tags.exp_count == 0))
		return ret;
	cpy_len = i2d_ASN1_TYPE(ret, &orig_der);
	ASN1_TYPE_free(ret);
	ret = NULL;
	cpy_start = orig_der;
	if (asn1_tags.imp_tag != -1)
		{
		r = ASN1_get_object(&cpy_start, &hdr_len, &hdr_tag, &hdr_class, cpy_len);
		if (r & 0x80)
			goto err;
		cpy_len -= cpy_start - orig_der;
		if (r & 0x1)
			{
			hdr_constructed = 2;
			hdr_len = 0;
			}
		else
			hdr_constructed = r & V_ASN1_CONSTRUCTED;
		len = ASN1_object_size(0, hdr_len, asn1_tags.imp_tag);
		}
	else
		len = cpy_len;
	for(i = 0, etmp = asn1_tags.exp_list + asn1_tags.exp_count - 1; i < asn1_tags.exp_count; i++, etmp--)
		{
		len += etmp->exp_pad;
		etmp->exp_len = len;
		len = ASN1_object_size(0, len, etmp->exp_tag);
		}
	new_der = OPENSSL_malloc(len);
	p = new_der;
	for (i = 0, etmp = asn1_tags.exp_list; i < asn1_tags.exp_count; i++, etmp++)
		{
		ASN1_put_object(&p, etmp->exp_constructed, etmp->exp_len,
					etmp->exp_tag, etmp->exp_class);
		if (etmp->exp_pad)
			*p++ = 0;
		}
	if (asn1_tags.imp_tag != -1)
		ASN1_put_object(&p, hdr_constructed, hdr_len,
					asn1_tags.imp_tag, asn1_tags.imp_class);
	memcpy(p, cpy_start, cpy_len);
	p = new_der;
	ret = d2i_ASN1_TYPE(NULL, &p, len);
	err:
	if (orig_der)
		OPENSSL_free(orig_der);
	if (new_der)
		OPENSSL_free(new_der);
	return ret;
	}
["ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf)\n\t{\n\tASN1_TYPE *ret;\n\ttag_exp_arg asn1_tags;\n\ttag_exp_type *etmp;\n\tint i, len;\n\tunsigned char *orig_der = NULL, *new_der = NULL;\n\tunsigned char *cpy_start, *p;\n\tint cpy_len;\n\tlong hdr_len;\n\tint hdr_constructed, hdr_tag, hdr_class;\n\tint r;\n\tasn1_tags.imp_tag = -1;\n\tasn1_tags.imp_class = -1;\n\tasn1_tags.format = ASN1_GEN_FORMAT_ASCII;\n\tasn1_tags.exp_count = 0;\n\tif (CONF_parse_list(str, ',', 1, asn1_cb, &asn1_tags) != 0)\n\t\treturn NULL;\n\tif ((asn1_tags.utype == V_ASN1_SEQUENCE) || (asn1_tags.utype == V_ASN1_SET))\n\t\t{\n\t\tif (!cnf)\n\t\t\t{\n\t\t\tASN1err(ASN1_F_ASN1_GENERATE_V3, ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG);\n\t\t\treturn NULL;\n\t\t\t}\n\t\tret = asn1_multi(asn1_tags.utype, asn1_tags.str, cnf);\n\t\t}\n\telse\n\t\tret = asn1_str2type(asn1_tags.str, asn1_tags.format, asn1_tags.utype);\n\tif (!ret)\n\t\treturn NULL;\n\tif ((asn1_tags.imp_tag == -1) && (asn1_tags.exp_count == 0))\n\t\treturn ret;\n\tcpy_len = i2d_ASN1_TYPE(ret, &orig_der);\n\tASN1_TYPE_free(ret);\n\tret = NULL;\n\tcpy_start = orig_der;\n\tif (asn1_tags.imp_tag != -1)\n\t\t{\n\t\tr = ASN1_get_object(&cpy_start, &hdr_len, &hdr_tag, &hdr_class, cpy_len);\n\t\tif (r & 0x80)\n\t\t\tgoto err;\n\t\tcpy_len -= cpy_start - orig_der;\n\t\tif (r & 0x1)\n\t\t\t{\n\t\t\thdr_constructed = 2;\n\t\t\thdr_len = 0;\n\t\t\t}\n\t\telse\n\t\t\thdr_constructed = r & V_ASN1_CONSTRUCTED;\n\t\tlen = ASN1_object_size(0, hdr_len, asn1_tags.imp_tag);\n\t\t}\n\telse\n\t\tlen = cpy_len;\n\tfor(i = 0, etmp = asn1_tags.exp_list + asn1_tags.exp_count - 1; i < asn1_tags.exp_count; i++, etmp--)\n\t\t{\n\t\tlen += etmp->exp_pad;\n\t\tetmp->exp_len = len;\n\t\tlen = ASN1_object_size(0, len, etmp->exp_tag);\n\t\t}\n\tnew_der = OPENSSL_malloc(len);\n\tp = new_der;\n\tfor (i = 0, etmp = asn1_tags.exp_list; i < asn1_tags.exp_count; i++, etmp++)\n\t\t{\n\t\tASN1_put_object(&p, etmp->exp_constructed, etmp->exp_len,\n\t\t\t\t\tetmp->exp_tag, etmp->exp_class);\n\t\tif (etmp->exp_pad)\n\t\t\t*p++ = 0;\n\t\t}\n\tif (asn1_tags.imp_tag != -1)\n\t\tASN1_put_object(&p, hdr_constructed, hdr_len,\n\t\t\t\t\tasn1_tags.imp_tag, asn1_tags.imp_class);\n\tmemcpy(p, cpy_start, cpy_len);\n\tp = new_der;\n\tret = d2i_ASN1_TYPE(NULL, &p, len);\n\terr:\n\tif (orig_der)\n\t\tOPENSSL_free(orig_der);\n\tif (new_der)\n\t\tOPENSSL_free(new_der);\n\treturn ret;\n\t}"]