apps/pkcs12.c:315: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, +oo] by call to `X509_check_private_key`.
Showing all 23 steps of the trace


apps/pkcs12.c:307:6: Call
305.   
306.   	/* Load in all certs in input file */
307.   	if(!cert_load(in, certs)) {
            ^
308.   		BIO_printf(bio_err, "Error loading certificates from input\n");
309.   		ERR_print_errors(bio_err);

apps/pkcs12.c:632:16: Call
  630.   	X509 *cert;
  631.   	ret = 0;
  632.   	while((cert = PEM_read_bio_X509(in, NULL, NULL, NULL))) {
                        ^
  633.   		ret = 1;
  634.   		sk_X509_push(sk, cert);

crypto/pem/pem_all.c:68:1: Call
    66.   #include <openssl/pem.h>
    67.   
    68. > IMPLEMENT_PEM_rw(X509, X509, PEM_STRING_X509, X509)
    69.   
    70.   IMPLEMENT_PEM_rw(X509_REQ, X509_REQ, PEM_STRING_X509_REQ, X509_REQ)

crypto/pem/pem_lib.c:221:9: Call
      219.   			int klen;
      220.   			char psbuf[PEM_BUFSIZE];
      221.   			p8 = d2i_X509_SIG((X509_SIG **)x, &p, len);
                     ^
      222.   			if(!p8) goto p8err;
      223.   			if (cb) klen=cb(psbuf,PEM_BUFSIZE,0,u);

crypto/asn1/x_sig.c:79:1: Parameter `(*a)->algor->parameter->value.ptr->data`
        77.   	}
        78.   
        79. > X509_SIG *d2i_X509_SIG(X509_SIG **a, unsigned char **pp, long length)
        80.   	{
        81.   	M_ASN1_D2I_vars(a,X509_SIG *,X509_SIG_new);

apps/pkcs12.c:315:6: Call
313.   	for(i = 0; i < sk_X509_num(certs); i++) {
314.   		ucert = sk_X509_value(certs, i);
315.   		if(X509_check_private_key(ucert, key)) {
            ^
316.   			X509_digest(cert, EVP_sha1(), keyid, &keyidlen);
317.   			break;

crypto/x509/x509_cmp.c:246:1: Parameter `*x->cert_info->key->algor->parameter->value.sequence->data`
  244.   	}
  245.   
  246. > int X509_check_private_key(X509 *x, EVP_PKEY *k)
  247.   	{
  248.   	EVP_PKEY *xk=NULL;

crypto/x509/x509_cmp.c:251:5: Call
  249.   	int ok=0;
  250.   
  251.   	xk=X509_get_pubkey(x);
             ^
  252.   	if (xk->type != k->type)
  253.   	    {

crypto/x509/x509_cmp.c:239:1: Parameter `*x->cert_info->key->algor->parameter->value.sequence->data`
    237.   	}
    238.   
    239. > EVP_PKEY *X509_get_pubkey(X509 *x)
    240.   	{
    241.   	if ((x == NULL) || (x->cert_info == NULL))

crypto/x509/x509_cmp.c:243:9: Call
    241.   	if ((x == NULL) || (x->cert_info == NULL))
    242.   		return(NULL);
    243.   	return(X509_PUBKEY_get(x->cert_info->key));
                   ^
    244.   	}
    245.   

crypto/asn1/x_pubkey.c:201:1: Parameter `*key->algor->parameter->value.sequence->data`
      199.   	}
      200.   
      201. > EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *key)
      202.   	{
      203.   	EVP_PKEY *ret=NULL;

crypto/asn1/x_pubkey.c:238:4: Assignment
      236.   			{
      237.   			ret->pkey.dsa->write_params=0;
      238.   			p=a->parameter->value.sequence->data;
                ^
      239.   			j=a->parameter->value.sequence->length;
      240.   			if (!d2i_DSAparams(&ret->pkey.dsa,&p,(long)j))

crypto/asn1/x_pubkey.c:240:9: Call
      238.   			p=a->parameter->value.sequence->data;
      239.   			j=a->parameter->value.sequence->length;
      240.   			if (!d2i_DSAparams(&ret->pkey.dsa,&p,(long)j))
                     ^
      241.   				goto err;
      242.   			}

crypto/asn1/d2i_dsap.c:71:1: Parameter `**pp`
        69.   #endif
        70.   
        71. > DSA *d2i_DSAparams(DSA **a, unsigned char **pp, long length)
        72.   	{
        73.   	int i=ERR_R_NESTED_ASN1_ERROR;

crypto/asn1/d2i_dsap.c:77:2: Assignment
        75.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);
        76.   
        77.   	M_ASN1_D2I_Init();
               ^
        78.   	M_ASN1_D2I_start_sequence();
        79.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);

crypto/asn1/d2i_dsap.c:78:2: Call
        76.   
        77.   	M_ASN1_D2I_Init();
        78.   	M_ASN1_D2I_start_sequence();
               ^
        79.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
        80.   	if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn;

crypto/asn1/asn1_lib.c:277:1: Parameter `*c->p`
          275.   	}
          276.   
          277. > int asn1_GetSequence(ASN1_CTX *c, long *length)
          278.   	{
          279.   	unsigned char *q;

crypto/asn1/asn1_lib.c:282:9: Call
          280.   
          281.   	q=c->p;
          282.   	c->inf=ASN1_get_object(&(c->p),&(c->slen),&(c->tag),&(c->xclass),
                         ^
          283.   		*length);
          284.   	if (c->inf & 0x80)

crypto/asn1/asn1_lib.c:83:1: <Length trace>
81.   
82.   
83. > int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
84.   	     long omax)
85.   	{

crypto/asn1/asn1_lib.c:83:1: Parameter `**pp`
            81.   
            82.   
            83. > int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, int *pclass,
            84.   	     long omax)
            85.   	{

crypto/asn1/asn1_lib.c:88:2: Assignment
            86.   	int i,ret;
            87.   	long l;
            88.   	unsigned char *p= *pp;
                   ^
            89.   	int tag,xclass,inf;
            90.   	long max=omax;

crypto/asn1/asn1_lib.c:98:3: Assignment
            96.   	if (i == V_ASN1_PRIMITIVE_TAG)
            97.   		{		/* high-tag */
            98.   		p++;
                     ^
            99.   		if (--max == 0) goto err;
            100.   		l=0;

crypto/asn1/asn1_lib.c:101:10: Array access: Offset: [1, +oo] Size: [0, +oo] by call to `X509_check_private_key` 
            99.   		if (--max == 0) goto err;
            100.   		l=0;
            101.   		while (*p&0x80)
                            ^
            102.   			{
            103.   			l<<=7L;
