crypto/x509v3/v3_ocsp.c:189: 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:189:6: Call
187.   {
188.   	if (BIO_printf(bp, "%*s", ind, "") <= 0) return 0;
189.   	if(!ASN1_GENERALIZEDTIME_print(bp, cutoff)) return 0;
            ^
190.   	return 1;
191.   }

crypto/asn1/t_x509.c:404:1: <Offset trace>
402.       };
403.   
404. > int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
405.   	{
406.   	char *v;

crypto/asn1/t_x509.c:404:1: Parameter `*tm->data`
  402.       };
  403.   
  404. > int ASN1_GENERALIZEDTIME_print(BIO *bp, const ASN1_GENERALIZEDTIME *tm)
  405.   	{
  406.   	char *v;

crypto/asn1/t_x509.c:422:2: Assignment
  420.   	y= (v[0]-'0')*1000+(v[1]-'0')*100
  421.   		+ (v[2]-'0')*10+(v[3]-'0');
  422.   	M= (v[4]-'0')*10+(v[5]-'0');
          ^
  423.   	if ((M > 12) || (M < 1)) goto err;
  424.   	d= (v[6]-'0')*10+(v[7]-'0');

crypto/asn1/t_x509.c:398:1: <Length trace>
396.   }
397.   
398. > static const char *mon[12]=
399.       {
400.       "Jan","Feb","Mar","Apr","May","Jun",

crypto/asn1/t_x509.c:398:1: Array declaration
  396.   }
  397.   
  398. > static const char *mon[12]=
  399.       {
  400.       "Jan","Feb","Mar","Apr","May","Jun",

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

int ASN1_GENERALIZEDTIME_print(BIO *bp, const 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 (tm->length >= 14 &&
	    (v[12] >= '0') && (v[12] <= '9') &&
	    (v[13] >= '0') && (v[13] <= '9'))
		{
		s=  (v[12]-'0')*10+(v[13]-'0');
		if (tm->length >= 15 && 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_acutoff(const X509V3_EXT_METHOD *method, void *cutoff,\n\t\t\t    BIO *bp, int ind)\n{\n\tif (BIO_printf(bp, "%*s", ind, "") <= 0) return 0;\n\tif(!ASN1_GENERALIZEDTIME_print(bp, cutoff)) return 0;\n\treturn 1;\n}', 'int ASN1_GENERALIZEDTIME_print(BIO *bp, const 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\n\t\t+ (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 (tm->length >= 14 &&\n\t    (v[12] >= \'0\') && (v[12] <= \'9\') &&\n\t    (v[13] >= \'0\') && (v[13] <= \'9\'))\n\t\t{\n\t\ts=  (v[12]-\'0\')*10+(v[13]-\'0\');\n\t\tif (tm->length >= 15 && 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}']