crypto/asn1/a_int.c:368: error: INTEGER_OVERFLOW_L2
  ([0, 8] - 1):unsigned32.
Showing all 3 steps of the trace


crypto/asn1/a_int.c:361:7: <LHS trace>
359.   		a->type=V_ASN1_INTEGER;
360.   
361.   	for (i=0; i<sizeof(long); i++)
             ^
362.   		{
363.   		if (v == 0) break;

crypto/asn1/a_int.c:361:7: Assignment
359.   		a->type=V_ASN1_INTEGER;
360.   
361.   	for (i=0; i<sizeof(long); i++)
             ^
362.   		{
363.   		if (v == 0) break;

crypto/asn1/a_int.c:368:7: Binary operation: ([0, 8] - 1):unsigned32
366.   		}
367.   	j=0;
368.   	for (k=i-1; k >=0; k--)
             ^
369.   		a->data[j++]=buf[k];
370.   	a->length=j;

int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)
	{
	int j,k;
	unsigned int i;
	unsigned char buf[sizeof(long)+1];
	if (a->length < (int)(sizeof(long)+1))
		{
		if (a->data != NULL)
			OPENSSL_free(a->data);
		if ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL)
			memset((char *)a->data,0,sizeof(long)+1);
		}
	if (a->data == NULL)
		{
		ASN1err(ASN1_F_ASN1_INTEGER_SET,ERR_R_MALLOC_FAILURE);
		return(0);
		}
	if (v < 0)
		{
		v= -v;
		a->type=V_ASN1_NEG_INTEGER;
		}
	else
		a->type=V_ASN1_INTEGER;
	for (i=0; i<sizeof(long); i++)
		{
		if (v == 0) break;
		buf[i]=(int)v&0xff;
		v>>=8;
		}
	j=0;
	for (k=i-1; k >=0; k--)
		a->data[j++]=buf[k];
	a->length=j;
	return(1);
	}
['int ASN1_INTEGER_set(ASN1_INTEGER *a, long v)\n\t{\n\tint j,k;\n\tunsigned int i;\n\tunsigned char buf[sizeof(long)+1];\n\tif (a->length < (int)(sizeof(long)+1))\n\t\t{\n\t\tif (a->data != NULL)\n\t\t\tOPENSSL_free(a->data);\n\t\tif ((a->data=(unsigned char *)OPENSSL_malloc(sizeof(long)+1)) != NULL)\n\t\t\tmemset((char *)a->data,0,sizeof(long)+1);\n\t\t}\n\tif (a->data == NULL)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_INTEGER_SET,ERR_R_MALLOC_FAILURE);\n\t\treturn(0);\n\t\t}\n\tif (v < 0)\n\t\t{\n\t\tv= -v;\n\t\ta->type=V_ASN1_NEG_INTEGER;\n\t\t}\n\telse\n\t\ta->type=V_ASN1_INTEGER;\n\tfor (i=0; i<sizeof(long); i++)\n\t\t{\n\t\tif (v == 0) break;\n\t\tbuf[i]=(int)v&0xff;\n\t\tv>>=8;\n\t\t}\n\tj=0;\n\tfor (k=i-1; k >=0; k--)\n\t\ta->data[j++]=buf[k];\n\ta->length=j;\n\treturn(1);\n\t}']