crypto/x509v3/v3_ocsp.c:169: error: BUFFER_OVERRUN_L3
  Offset: [-529, +oo] Size: 12 by call to `ASN1_GENERALIZEDTIME_print`.
Showing all 9 steps of the trace


crypto/x509v3/v3_ocsp.c:157:8: Call
155.   	        {
156.   		if (!BIO_printf(bp, "%*scrlUrl: ", ind, "")) goto err;
157.   		if (!ASN1_STRING_print(bp, (ASN1_STRING*)a->crlUrl)) goto err;
              ^
158.   		if (!BIO_write(bp, "\n", 1)) goto err;
159.   		}

crypto/asn1/t_x509.c:332:1: Parameter `*v->data`
  330.   }
  331.   
  332. > int ASN1_STRING_print(BIO *bp, ASN1_STRING *v)
  333.   	{
  334.   	int i,n;

crypto/x509v3/v3_ocsp.c:169:8: Call
167.   	        {
168.   		if (!BIO_printf(bp, "%*scrlTime: ", ind, "")) goto err;
169.   		if (!ASN1_GENERALIZEDTIME_print(bp, a->crlTime)) goto err;
              ^
170.   		if (!BIO_write(bp, "\n", 1)) goto err;
171.   		}

crypto/asn1/t_x509.c:376:1: <Offset trace>
374.       };
375.   
376. > int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
377.   	{
378.   	char *v;

crypto/asn1/t_x509.c:376:1: Parameter `*tm->data`
  374.       };
  375.   
  376. > int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
  377.   	{
  378.   	char *v;

crypto/asn1/t_x509.c:393:2: Assignment
  391.   		if ((v[i] > '9') || (v[i] < '0')) goto err;
  392.   	y= (v[0]-'0')*1000+(v[1]-'0')*100 + (v[2]-'0')*10+(v[3]-'0');
  393.   	M= (v[4]-'0')*10+(v[5]-'0');
          ^
  394.   	if ((M > 12) || (M < 1)) goto err;
  395.   	d= (v[6]-'0')*10+(v[7]-'0');

crypto/asn1/t_x509.c:370:1: <Length trace>
368.   }
369.   
370. > static const char *mon[12]=
371.       {
372.       "Jan","Feb","Mar","Apr","May","Jun",

crypto/asn1/t_x509.c:370:1: Array declaration
  368.   }
  369.   
  370. > static const char *mon[12]=
  371.       {
  372.       "Jan","Feb","Mar","Apr","May","Jun",

crypto/asn1/t_x509.c:414:3: Array access: Offset: [-529, +oo] Size: 12 by call to `ASN1_GENERALIZEDTIME_print` 
  412.   
  413.   	if (BIO_printf(bp,"%s %2d %02d:%02d:%02d%.*s %d%s",
  414.   		mon[M-1],d,h,m,s,f_len,f,y,(gmt)?" GMT":"") <= 0)
           ^
  415.   		return(0);
  416.   	else

int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
	{
	char *v;
	int gmt=0;
	int i;
	int y=0,M=0,d=0,h=0,m=0,s=0;
	char *f = NULL;
	int f_len = 0;
	i=tm->length;
	v=(char *)tm->data;
	if (i < 12) goto err;
	if (v[i-1] == 'Z') gmt=1;
	for (i=0; i<12; i++)
		if ((v[i] > '9') || (v[i] < '0')) goto err;
	y= (v[0]-'0')*1000+(v[1]-'0')*100 + (v[2]-'0')*10+(v[3]-'0');
	M= (v[4]-'0')*10+(v[5]-'0');
	if ((M > 12) || (M < 1)) goto err;
	d= (v[6]-'0')*10+(v[7]-'0');
	h= (v[8]-'0')*10+(v[9]-'0');
	m=  (v[10]-'0')*10+(v[11]-'0');
	if (	(v[12] >= '0') && (v[12] <= '9') &&
		(v[13] >= '0') && (v[13] <= '9'))
		{
		s=  (v[12]-'0')*10+(v[13]-'0');
		if (v[14] == '.')
			{
			int l = tm->length;
			f = &v[14];
			f_len = 1;
			while (14 + f_len < l && f[f_len] >= '0' && f[f_len] <= '9')
				++f_len;
			}
		}
	if (BIO_printf(bp,"%s %2d %02d:%02d:%02d%.*s %d%s",
		mon[M-1],d,h,m,s,f_len,f,y,(gmt)?" GMT":"") <= 0)
		return(0);
	else
		return(1);
err:
	BIO_write(bp,"Bad time value",14);
	return(0);
	}
['static int i2r_ocsp_crlid(X509V3_EXT_METHOD *method, void *in, BIO *bp, int ind)\n{\n\tOCSP_CRLID *a = in;\n\tif (a->crlUrl)\n\t        {\n\t\tif (!BIO_printf(bp, "%*scrlUrl: ", ind, "")) goto err;\n\t\tif (!ASN1_STRING_print(bp, (ASN1_STRING*)a->crlUrl)) goto err;\n\t\tif (!BIO_write(bp, "\\n", 1)) goto err;\n\t\t}\n\tif (a->crlNum)\n\t        {\n\t\tif (!BIO_printf(bp, "%*scrlNum: ", ind, "")) goto err;\n\t\tif (!i2a_ASN1_INTEGER(bp, a->crlNum)) goto err;\n\t\tif (!BIO_write(bp, "\\n", 1)) goto err;\n\t\t}\n\tif (a->crlTime)\n\t        {\n\t\tif (!BIO_printf(bp, "%*scrlTime: ", ind, "")) goto err;\n\t\tif (!ASN1_GENERALIZEDTIME_print(bp, a->crlTime)) goto err;\n\t\tif (!BIO_write(bp, "\\n", 1)) goto err;\n\t\t}\n\treturn 1;\n\terr:\n\treturn 0;\n}', "int ASN1_STRING_print(BIO *bp, ASN1_STRING *v)\n\t{\n\tint i,n;\n\tchar buf[80],*p;;\n\tif (v == NULL) return(0);\n\tn=0;\n\tp=(char *)v->data;\n\tfor (i=0; i<v->length; i++)\n\t\t{\n\t\tif ((p[i] > '~') || ((p[i] < ' ') &&\n\t\t\t(p[i] != '\\n') && (p[i] != '\\r')))\n\t\t\tbuf[n]='.';\n\t\telse\n\t\t\tbuf[n]=p[i];\n\t\tn++;\n\t\tif (n >= 80)\n\t\t\t{\n\t\t\tif (BIO_write(bp,buf,n) <= 0)\n\t\t\t\treturn(0);\n\t\t\tn=0;\n\t\t\t}\n\t\t}\n\tif (n > 0)\n\t\tif (BIO_write(bp,buf,n) <= 0)\n\t\t\treturn(0);\n\treturn(1);\n\t}", 'int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)\n\t{\n\tchar *v;\n\tint gmt=0;\n\tint i;\n\tint y=0,M=0,d=0,h=0,m=0,s=0;\n\tchar *f = NULL;\n\tint f_len = 0;\n\ti=tm->length;\n\tv=(char *)tm->data;\n\tif (i < 12) goto err;\n\tif (v[i-1] == \'Z\') gmt=1;\n\tfor (i=0; i<12; i++)\n\t\tif ((v[i] > \'9\') || (v[i] < \'0\')) goto err;\n\ty= (v[0]-\'0\')*1000+(v[1]-\'0\')*100 + (v[2]-\'0\')*10+(v[3]-\'0\');\n\tM= (v[4]-\'0\')*10+(v[5]-\'0\');\n\tif ((M > 12) || (M < 1)) goto err;\n\td= (v[6]-\'0\')*10+(v[7]-\'0\');\n\th= (v[8]-\'0\')*10+(v[9]-\'0\');\n\tm=  (v[10]-\'0\')*10+(v[11]-\'0\');\n\tif (\t(v[12] >= \'0\') && (v[12] <= \'9\') &&\n\t\t(v[13] >= \'0\') && (v[13] <= \'9\'))\n\t\t{\n\t\ts=  (v[12]-\'0\')*10+(v[13]-\'0\');\n\t\tif (v[14] == \'.\')\n\t\t\t{\n\t\t\tint l = tm->length;\n\t\t\tf = &v[14];\n\t\t\tf_len = 1;\n\t\t\twhile (14 + f_len < l && f[f_len] >= \'0\' && f[f_len] <= \'9\')\n\t\t\t\t++f_len;\n\t\t\t}\n\t\t}\n\tif (BIO_printf(bp,"%s %2d %02d:%02d:%02d%.*s %d%s",\n\t\tmon[M-1],d,h,m,s,f_len,f,y,(gmt)?" GMT":"") <= 0)\n\t\treturn(0);\n\telse\n\t\treturn(1);\nerr:\n\tBIO_write(bp,"Bad time value",14);\n\treturn(0);\n\t}']