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


crypto/x509v3/v3_ocsp.c:159:6: Call
157.   {
158.   	if (!BIO_printf(bp, "%*s", ind, "")) return 0;
159.   	if(!ASN1_GENERALIZEDTIME_print(bp, cutoff)) return 0;
            ^
160.   	return 1;
161.   }

crypto/asn1/t_x509.c:363:1: <Offset trace>
361.       };
362.   
363. > int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
364.   	{
365.   	char *v;

crypto/asn1/t_x509.c:363:1: Parameter `*tm->data`
  361.       };
  362.   
  363. > int ASN1_GENERALIZEDTIME_print(BIO *bp, ASN1_GENERALIZEDTIME *tm)
  364.   	{
  365.   	char *v;

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

crypto/asn1/t_x509.c:357:1: <Length trace>
355.   }
356.   
357. > static const char *mon[12]=
358.       {
359.       "Jan","Feb","Mar","Apr","May","Jun",

crypto/asn1/t_x509.c:357:1: Array declaration
  355.   }
  356.   
  357. > static const char *mon[12]=
  358.       {
  359.       "Jan","Feb","Mar","Apr","May","Jun",

crypto/asn1/t_x509.c:388:3: Array access: Offset: [-529, +oo] Size: 12 by call to `ASN1_GENERALIZEDTIME_print` 
  386.   
  387.   	if (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",
  388.   		mon[M-1],d,h,m,s,y,(gmt)?" GMT":"") <= 0)
           ^
  389.   		return(0);
  390.   	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;
	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 (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",
		mon[M-1],d,h,m,s,y,(gmt)?" GMT":"") <= 0)
		return(0);
	else
		return(1);
err:
	BIO_write(bp,"Bad time value",14);
	return(0);
	}
['static int i2r_ocsp_acutoff(X509V3_EXT_METHOD *method, void *cutoff, BIO *bp, int ind)\n{\n\tif (!BIO_printf(bp, "%*s", ind, "")) return 0;\n\tif(!ASN1_GENERALIZEDTIME_print(bp, cutoff)) return 0;\n\treturn 1;\n}', '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\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\ts=  (v[12]-\'0\')*10+(v[13]-\'0\');\n\tif (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",\n\t\tmon[M-1],d,h,m,s,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}']