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


crypto/asn1/asn1_gen.c:327:8: 
325.   		case ASN1_GEN_FLAG_EXP:
326.   
327. > 		if (!parse_tagging(vstart, vlen, &tmp_tag, &tmp_class))
328.   			return -1;
329.   		if (!append_exp(arg, tmp_tag, tmp_class, 1, 0, 0))

static int asn1_cb(const char *elem, int len, void *bitstr)
	{
	tag_exp_arg *arg = bitstr;
	int i;
	int utype;
	int vlen;
	const char *p, *vstart = NULL;
	int tmp_tag, tmp_class;
	for(i = 0, p = elem; i < len; p++, i++)
		{
		if (*p == ':')
			{
			vstart = p + 1;
			vlen = len - (vstart - elem);
			len = p - elem;
			break;
			}
		}
	utype = asn1_str2tag(elem, len);
	if (utype == -1)
		{
		ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKNOWN_TAG);
		ERR_add_error_data(2, "tag=", elem);
		return -1;
		}
	if (!(utype & ASN1_GEN_FLAG))
		{
		arg->utype = utype;
		arg->str = vstart;
		if (!vstart && elem[len])
			{
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_MISSING_VALUE);
			return -1;
			}
		return 0;
		}
	switch(utype)
		{
		case ASN1_GEN_FLAG_IMP:
		if (arg->imp_tag != -1)
			{
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_ILLEGAL_NESTED_TAGGING);
			return -1;
			}
		if (!parse_tagging(vstart, vlen, &arg->imp_tag, &arg->imp_class))
			return -1;
		break;
		case ASN1_GEN_FLAG_EXP:
		if (!parse_tagging(vstart, vlen, &tmp_tag, &tmp_class))
			return -1;
		if (!append_exp(arg, tmp_tag, tmp_class, 1, 0, 0))
			return -1;
		break;
		case ASN1_GEN_FLAG_SEQWRAP:
		if (!append_exp(arg, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, 1, 0, 1))
			return -1;
		break;
		case ASN1_GEN_FLAG_BITWRAP:
		if (!append_exp(arg, V_ASN1_BIT_STRING, V_ASN1_UNIVERSAL, 0, 1, 1))
			return -1;
		break;
		case ASN1_GEN_FLAG_OCTWRAP:
		if (!append_exp(arg, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL, 0, 0, 1))
			return -1;
		break;
		case ASN1_GEN_FLAG_FORMAT:
		if (!strncmp(vstart, "ASCII", 5))
			arg->format = ASN1_GEN_FORMAT_ASCII;
		else if (!strncmp(vstart, "UTF8", 4))
			arg->format = ASN1_GEN_FORMAT_UTF8;
		else if (!strncmp(vstart, "HEX", 3))
			arg->format = ASN1_GEN_FORMAT_HEX;
		else if (!strncmp(vstart, "BITLIST", 3))
			arg->format = ASN1_GEN_FORMAT_BITLIST;
		else
			{
			ASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKOWN_FORMAT);
			return -1;
			}
		break;
		}
	return 1;
	}
['static int asn1_cb(const char *elem, int len, void *bitstr)\n\t{\n\ttag_exp_arg *arg = bitstr;\n\tint i;\n\tint utype;\n\tint vlen;\n\tconst char *p, *vstart = NULL;\n\tint tmp_tag, tmp_class;\n\tfor(i = 0, p = elem; i < len; p++, i++)\n\t\t{\n\t\tif (*p == \':\')\n\t\t\t{\n\t\t\tvstart = p + 1;\n\t\t\tvlen = len - (vstart - elem);\n\t\t\tlen = p - elem;\n\t\t\tbreak;\n\t\t\t}\n\t\t}\n\tutype = asn1_str2tag(elem, len);\n\tif (utype == -1)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKNOWN_TAG);\n\t\tERR_add_error_data(2, "tag=", elem);\n\t\treturn -1;\n\t\t}\n\tif (!(utype & ASN1_GEN_FLAG))\n\t\t{\n\t\targ->utype = utype;\n\t\targ->str = vstart;\n\t\tif (!vstart && elem[len])\n\t\t\t{\n\t\t\tASN1err(ASN1_F_ASN1_CB, ASN1_R_MISSING_VALUE);\n\t\t\treturn -1;\n\t\t\t}\n\t\treturn 0;\n\t\t}\n\tswitch(utype)\n\t\t{\n\t\tcase ASN1_GEN_FLAG_IMP:\n\t\tif (arg->imp_tag != -1)\n\t\t\t{\n\t\t\tASN1err(ASN1_F_ASN1_CB, ASN1_R_ILLEGAL_NESTED_TAGGING);\n\t\t\treturn -1;\n\t\t\t}\n\t\tif (!parse_tagging(vstart, vlen, &arg->imp_tag, &arg->imp_class))\n\t\t\treturn -1;\n\t\tbreak;\n\t\tcase ASN1_GEN_FLAG_EXP:\n\t\tif (!parse_tagging(vstart, vlen, &tmp_tag, &tmp_class))\n\t\t\treturn -1;\n\t\tif (!append_exp(arg, tmp_tag, tmp_class, 1, 0, 0))\n\t\t\treturn -1;\n\t\tbreak;\n\t\tcase ASN1_GEN_FLAG_SEQWRAP:\n\t\tif (!append_exp(arg, V_ASN1_SEQUENCE, V_ASN1_UNIVERSAL, 1, 0, 1))\n\t\t\treturn -1;\n\t\tbreak;\n\t\tcase ASN1_GEN_FLAG_BITWRAP:\n\t\tif (!append_exp(arg, V_ASN1_BIT_STRING, V_ASN1_UNIVERSAL, 0, 1, 1))\n\t\t\treturn -1;\n\t\tbreak;\n\t\tcase ASN1_GEN_FLAG_OCTWRAP:\n\t\tif (!append_exp(arg, V_ASN1_OCTET_STRING, V_ASN1_UNIVERSAL, 0, 0, 1))\n\t\t\treturn -1;\n\t\tbreak;\n\t\tcase ASN1_GEN_FLAG_FORMAT:\n\t\tif (!strncmp(vstart, "ASCII", 5))\n\t\t\targ->format = ASN1_GEN_FORMAT_ASCII;\n\t\telse if (!strncmp(vstart, "UTF8", 4))\n\t\t\targ->format = ASN1_GEN_FORMAT_UTF8;\n\t\telse if (!strncmp(vstart, "HEX", 3))\n\t\t\targ->format = ASN1_GEN_FORMAT_HEX;\n\t\telse if (!strncmp(vstart, "BITLIST", 3))\n\t\t\targ->format = ASN1_GEN_FORMAT_BITLIST;\n\t\telse\n\t\t\t{\n\t\t\tASN1err(ASN1_F_ASN1_CB, ASN1_R_UNKOWN_FORMAT);\n\t\t\treturn -1;\n\t\t\t}\n\t\tbreak;\n\t\t}\n\treturn 1;\n\t}']