apps/ca.c:1282: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned32 by call to `ASN1_INTEGER_to_BN`.
Showing all 11 steps of the trace


apps/ca.c:1274:5: Call
1272.   		goto err;
1273.   		}
1274.   	ai=ASN1_INTEGER_new();
            ^
1275.   	if (ai == NULL) goto err;
1276.   	if (!a2i_ASN1_INTEGER(in,ai,buf,1024))

crypto/asn1/asn1_lib.c:373:2: Assignment
  371.   		return(NULL);
  372.   		}
  373.   	ret->length=0;
          ^
  374.   	ret->type=type;
  375.   	ret->data=NULL;

apps/ca.c:1276:7: Call
1274.   	ai=ASN1_INTEGER_new();
1275.   	if (ai == NULL) goto err;
1276.   	if (!a2i_ASN1_INTEGER(in,ai,buf,1024))
              ^
1277.   		{
1278.   		BIO_printf(bio_err,"unable to load number from %s\n",

crypto/asn1/f_int.c:97:1: Parameter `bs->length`
  95.   	}
  96.   
  97. > int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)
  98.   	{
  99.   	int ret=0;

apps/ca.c:1282:6: Call
1280.   		goto err;
1281.   		}
1282.   	ret=ASN1_INTEGER_to_BN(ai,NULL);
             ^
1283.   	if (ret == NULL)
1284.   		{

crypto/asn1/a_int.c:416:1: Parameter `ai->length`
  414.   	}
  415.   
  416. > BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
  417.   	{
  418.   	BIGNUM *ret;

crypto/asn1/a_int.c:420:11: Call
  418.   	BIGNUM *ret;
  419.   
  420.   	if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
                   ^
  421.   		ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);
  422.   	if(ai->type == V_ASN1_NEG_INTEGER) bn->neg = 1;

crypto/bn/bn_lib.c:595:1: <LHS trace>
593.   
594.   /* ignore negative */
595. > BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
596.   	{
597.   	unsigned int i,m;

crypto/bn/bn_lib.c:595:1: Parameter `len`
    593.   
    594.   /* ignore negative */
    595. > BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
    596.   	{
    597.   	unsigned int i,m;

crypto/bn/bn_lib.c:604:2: Assignment
    602.   	if (ret == NULL) return(NULL);
    603.   	l=0;
    604.   	n=len;
            ^
    605.   	if (n == 0)
    606.   		{

crypto/bn/bn_lib.c:612:2: Binary operation: ([0, +oo] - 1):unsigned32 by call to `ASN1_INTEGER_to_BN` 
    610.   	if (bn_expand(ret,(int)(n+2)*8) == NULL)
    611.   		return(NULL);
    612.   	i=((n-1)/BN_BYTES)+1;
            ^
    613.   	m=((n-1)%(BN_BYTES));
    614.   	ret->top=i;

BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)
	{
	unsigned int i,m;
	unsigned int n;
	BN_ULONG l;
	if (ret == NULL) ret=BN_new();
	if (ret == NULL) return(NULL);
	l=0;
	n=len;
	if (n == 0)
		{
		ret->top=0;
		return(ret);
		}
	if (bn_expand(ret,(int)(n+2)*8) == NULL)
		return(NULL);
	i=((n-1)/BN_BYTES)+1;
	m=((n-1)%(BN_BYTES));
	ret->top=i;
	while (n-- > 0)
		{
		l=(l<<8L)| *(s++);
		if (m-- == 0)
			{
			ret->d[--i]=l;
			l=0;
			m=BN_BYTES-1;
			}
		}
	bn_fix_top(ret);
	return(ret);
	}
['ASN1_STRING *ASN1_STRING_type_new(int type)\n\t{\n\tASN1_STRING *ret;\n\tret=(ASN1_STRING *)Malloc(sizeof(ASN1_STRING));\n\tif (ret == NULL)\n\t\t{\n\t\tASN1err(ASN1_F_ASN1_STRING_TYPE_NEW,ERR_R_MALLOC_FAILURE);\n\t\treturn(NULL);\n\t\t}\n\tret->length=0;\n\tret->type=type;\n\tret->data=NULL;\n\tret->flags=0;\n\treturn(ret);\n\t}', "int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size)\n\t{\n\tint ret=0;\n\tint i,j,k,m,n,again,bufsize;\n\tunsigned char *s=NULL,*sp;\n\tunsigned char *bufp;\n\tint num=0,slen=0,first=1;\n\tbs->type=V_ASN1_INTEGER;\n\tbufsize=BIO_gets(bp,buf,size);\n\tfor (;;)\n\t\t{\n\t\tif (bufsize < 1) goto err_sl;\n\t\ti=bufsize;\n\t\tif (buf[i-1] == '\\n') buf[--i]='\\0';\n\t\tif (i == 0) goto err_sl;\n\t\tif (buf[i-1] == '\\r') buf[--i]='\\0';\n\t\tif (i == 0) goto err_sl;\n\t\tagain=(buf[i-1] == '\\\\');\n\t\tfor (j=0; j<i; j++)\n\t\t\t{\n\t\t\tif (!(\t((buf[j] >= '0') && (buf[j] <= '9')) ||\n\t\t\t\t((buf[j] >= 'a') && (buf[j] <= 'f')) ||\n\t\t\t\t((buf[j] >= 'A') && (buf[j] <= 'F'))))\n\t\t\t\t{\n\t\t\t\ti=j;\n\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\tbuf[i]='\\0';\n\t\tif (i < 2) goto err_sl;\n\t\tbufp=(unsigned char *)buf;\n\t\tif (first)\n\t\t\t{\n\t\t\tfirst=0;\n\t\t\tif ((bufp[0] == '0') && (buf[1] == '0'))\n\t\t\t\t{\n\t\t\t\tbufp+=2;\n\t\t\t\ti-=2;\n\t\t\t\t}\n\t\t\t}\n\t\tk=0;\n\t\ti-=again;\n\t\tif (i%2 != 0)\n\t\t\t{\n\t\t\tASN1err(ASN1_F_A2I_ASN1_INTEGER,ASN1_R_ODD_NUMBER_OF_CHARS);\n\t\t\tgoto err;\n\t\t\t}\n\t\ti/=2;\n\t\tif (num+i > slen)\n\t\t\t{\n\t\t\tif (s == NULL)\n\t\t\t\tsp=(unsigned char *)Malloc(\n\t\t\t\t\t(unsigned int)num+i*2);\n\t\t\telse\n\t\t\t\tsp=(unsigned char *)Realloc(s,\n\t\t\t\t\t(unsigned int)num+i*2);\n\t\t\tif (sp == NULL)\n\t\t\t\t{\n\t\t\t\tASN1err(ASN1_F_A2I_ASN1_INTEGER,ERR_R_MALLOC_FAILURE);\n\t\t\t\tif (s != NULL) Free((char *)s);\n\t\t\t\tgoto err;\n\t\t\t\t}\n\t\t\ts=sp;\n\t\t\tslen=num+i*2;\n\t\t\t}\n\t\tfor (j=0; j<i; j++,k+=2)\n\t\t\t{\n\t\t\tfor (n=0; n<2; n++)\n\t\t\t\t{\n\t\t\t\tm=bufp[k+n];\n\t\t\t\tif ((m >= '0') && (m <= '9'))\n\t\t\t\t\tm-='0';\n\t\t\t\telse if ((m >= 'a') && (m <= 'f'))\n\t\t\t\t\tm=m-'a'+10;\n\t\t\t\telse if ((m >= 'A') && (m <= 'F'))\n\t\t\t\t\tm=m-'A'+10;\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tASN1err(ASN1_F_A2I_ASN1_INTEGER,ASN1_R_NON_HEX_CHARACTERS);\n\t\t\t\t\tgoto err;\n\t\t\t\t\t}\n\t\t\t\ts[num+j]<<=4;\n\t\t\t\ts[num+j]|=m;\n\t\t\t\t}\n\t\t\t}\n\t\tnum+=i;\n\t\tif (again)\n\t\t\tbufsize=BIO_gets(bp,buf,size);\n\t\telse\n\t\t\tbreak;\n\t\t}\n\tbs->length=num;\n\tbs->data=s;\n\tret=1;\nerr:\n\tif (0)\n\t\t{\nerr_sl:\n\t\tASN1err(ASN1_F_A2I_ASN1_INTEGER,ASN1_R_SHORT_LINE);\n\t\t}\n\treturn(ret);\n\t}", 'BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)\n\t{\n\tBIGNUM *ret;\n\tif ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)\n\t\tASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);\n\tif(ai->type == V_ASN1_NEG_INTEGER) bn->neg = 1;\n\treturn(ret);\n\t}', 'BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret)\n\t{\n\tunsigned int i,m;\n\tunsigned int n;\n\tBN_ULONG l;\n\tif (ret == NULL) ret=BN_new();\n\tif (ret == NULL) return(NULL);\n\tl=0;\n\tn=len;\n\tif (n == 0)\n\t\t{\n\t\tret->top=0;\n\t\treturn(ret);\n\t\t}\n\tif (bn_expand(ret,(int)(n+2)*8) == NULL)\n\t\treturn(NULL);\n\ti=((n-1)/BN_BYTES)+1;\n\tm=((n-1)%(BN_BYTES));\n\tret->top=i;\n\twhile (n-- > 0)\n\t\t{\n\t\tl=(l<<8L)| *(s++);\n\t\tif (m-- == 0)\n\t\t\t{\n\t\t\tret->d[--i]=l;\n\t\t\tl=0;\n\t\t\tm=BN_BYTES-1;\n\t\t\t}\n\t\t}\n\tbn_fix_top(ret);\n\treturn(ret);\n\t}']