crypto/ocsp/ocsp_ext.c:293: error: BUFFER_OVERRUN_L3
  Offset: [-529, +oo] Size: 12 by call to `OCSP_CRLID_print`.
Showing all 11 steps of the trace


crypto/ocsp/ocsp_ext.c:291:17: Call
289.   			        goto err;
290.   		        p = x->value->data;
291.   		        if (!(d2i_OCSP_CRLID(&crlid, &p, x->value->length)))
                       ^
292.   			        goto err;
293.   			if (!OCSP_CRLID_print(bp, crlid, (2*ind))) goto err;

crypto/ocsp/ocsp_res.c:813:1: Parameter `**pp`
  811.   	}
  812.   
  813. > OCSP_CRLID *d2i_OCSP_CRLID(OCSP_CRLID **a,
  814.   			   unsigned char **pp,
  815.   			   long length)

crypto/ocsp/ocsp_ext.c:293:9: Call
291.   		        if (!(d2i_OCSP_CRLID(&crlid, &p, x->value->length)))
292.   			        goto err;
293.   			if (!OCSP_CRLID_print(bp, crlid, (2*ind))) goto err;
               ^
294.   			OCSP_CRLID_free(crlid);
295.   		        break;

crypto/ocsp/ocsp_lib.c:666:1: Parameter `*a->crlTime->data`
  664.   	}
  665.   
  666. > int OCSP_CRLID_print(BIO *bp, OCSP_CRLID *a, int ind)
  667.           {
  668.   	if (a->crlUrl)

crypto/ocsp/ocsp_lib.c:683:8: Call
  681.   	        {
  682.   		if (!BIO_printf(bp, "%*scrlTime: ", ind, "")) goto err;
  683.   		if (!ASN1_GENERALIZEDTIME_print(bp, a->crlTime)) goto err;
                ^
  684.   		if (!BIO_write(bp, "\n", 1)) goto err;
  685.   		}

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

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

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

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

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

crypto/asn1/t_x509.c:404:3: Array access: Offset: [-529, +oo] Size: 12 by call to `OCSP_CRLID_print` 
    402.   
    403.   	if (BIO_printf(bp,"%s %2d %02d:%02d:%02d %d%s",
    404.   		mon[M-1],d,h,m,s,y,(gmt)?" GMT":"") <= 0)
             ^
    405.   		return(0);
    406.   	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);
	}
['int OCSP_extension_print(BIO *bp,\n\t\t\t X509_EXTENSION *x,\n\t\t\t int ind)\n        {\n\tint i, j;\n\tSTACK_OF(ASN1_OBJECT) *sk = NULL;\n\tunsigned char *p;\n\tOCSP_CRLID *crlid = NULL;\n\tOCSP_SERVICELOC *sloc = NULL;\n\tASN1_GENERALIZEDTIME *gt = NULL;\n\tif (!x) return 1;\n\tswitch (OBJ_obj2nid(x->object))\n\t        {\n\t\tcase NID_id_pkix_OCSP_Nonce:\n\t\t        if (BIO_printf(bp, "%*snonce: ", ind, "") <= 0)\n\t\t\t        goto err;\n\t\t\tif (M_ASN1_OCTET_STRING_print(bp, x->value) <= 0)\n\t\t\t        goto err;\n\t\t\tif (BIO_write(bp, "\\n", 1) <= 0) goto err;\n\t\t        break;\n\t\tcase NID_id_pkix_OCSP_CrlID:\n\t\t        if (BIO_printf(bp, "%*scrlId:\\n", ind, "") <= 0)\n\t\t\t        goto err;\n\t\t        p = x->value->data;\n\t\t        if (!(d2i_OCSP_CRLID(&crlid, &p, x->value->length)))\n\t\t\t        goto err;\n\t\t\tif (!OCSP_CRLID_print(bp, crlid, (2*ind))) goto err;\n\t\t\tOCSP_CRLID_free(crlid);\n\t\t        break;\n\t\tcase NID_id_pkix_OCSP_acceptableResponses:\n\t\t        if (BIO_printf(bp,\n\t\t\t\t      "%*sacceptable responses: ",\n\t\t\t\t      ind, "") <= 0)\n\t\t\t        goto err;\n\t\t        p = x->value->data;\n\t\t        if (!(d2i_ASN1_SET_OF_ASN1_OBJECT(&sk, &p, x->value->length,\n\t\t\t\t\t   d2i_ASN1_OBJECT,\n\t\t\t\t\t   ASN1_OBJECT_free,\n\t\t\t\t\t   V_ASN1_SEQUENCE,\n\t\t\t\t\t   V_ASN1_UNIVERSAL)))\n\t\t\t        goto err;\n\t\t\tfor (i = 0; i < sk_ASN1_OBJECT_num(sk); i++)\n\t\t\t        {\n\t\t                j=OBJ_obj2nid(sk_ASN1_OBJECT_value(sk,i));\n\t\t                if (BIO_printf(bp," %s ",\n\t\t\t\t\t       (j == NID_undef)?"UNKNOWN":\n\t\t\t\t\t                   OBJ_nid2ln(j)) <= 0)\n\t\t\t\t          goto err;\n\t\t\t\t}\n\t\t\tif (BIO_write(bp, "\\n", 1) <= 0) goto err;\n\t\t\tsk_ASN1_OBJECT_pop_free(sk, ASN1_OBJECT_free);\n\t\t        break;\n\t\tcase NID_id_pkix_OCSP_archiveCutoff:\n\t\t        if (BIO_printf(bp, "%*sarchive cutoff: ", ind, "")<=0)\n\t\t\t        goto err;\n\t\t        p = x->value->data;\n\t\t\tif (!d2i_ASN1_GENERALIZEDTIME(&gt, &p,\n\t\t\t\t\t\t      x->value->length))\n\t\t\t        goto err;\n\t\t\tif (!ASN1_GENERALIZEDTIME_print(bp, gt)) goto err;\n\t\t\tif (BIO_write(bp, "\\n", 1) <= 0) goto err;\n\t\t\tASN1_GENERALIZEDTIME_free(gt);\n\t\t        break;\n\t\tcase NID_id_pkix_OCSP_serviceLocator:\n\t\t  if (BIO_printf(bp, "%*sservice locator:\\n", ind, "") <= 0)\n\t\t\t        goto err;\n\t\t        p = x->value->data;\n\t\t\tif (!d2i_OCSP_SERVICELOC(&sloc, &p,\n\t\t\t\t\t\t x->value->length))\n\t\t\t        goto err;\n\t\t\tif (!OCSP_SERVICELOC_print(bp,sloc,(2*ind))) goto err;\n\t\t\tOCSP_SERVICELOC_free(sloc);\n\t\t        break;\n\t        case NID_undef:\n\t        default:\n\t\t        if (BIO_printf(bp,"%*sunrecognized oid: ",ind,"") <= 0)\n\t\t\t        goto err;\n\t\t        break;\n\t\t}\n\treturn 1;\nerr:\n\treturn 0;\n\t}', 'OCSP_CRLID *d2i_OCSP_CRLID(OCSP_CRLID **a,\n\t\t\t   unsigned char **pp,\n\t\t\t   long length)\n\t{\n\tM_ASN1_D2I_vars(a,OCSP_CRLID *,OCSP_CRLID_new);\n\tM_ASN1_D2I_Init();\n\tM_ASN1_D2I_start_sequence();\n\tM_ASN1_D2I_get_EXP_opt(ret->crlUrl, d2i_ASN1_IA5STRING, 0);\n\tM_ASN1_D2I_get_EXP_opt(ret->crlNum, d2i_ASN1_INTEGER, 1);\n\tM_ASN1_D2I_get_EXP_opt(ret->crlTime, d2i_ASN1_GENERALIZEDTIME, 2);\n\tM_ASN1_D2I_Finish(a,OCSP_CRLID_free,ASN1_F_D2I_OCSP_CRLID);\n\t}', 'int OCSP_CRLID_print(BIO *bp, OCSP_CRLID *a, int ind)\n        {\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;\nerr:\n\treturn 0;\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\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}']