crypto/asn1/d2i_s_pr.c:78: error: NULL_DEREFERENCE
  pointer `bs` last assigned on line 72 could be null and is dereferenced at line 78, column 6.
Showing all 34 steps of the trace


crypto/asn1/d2i_s_pr.c:69:1: start of procedure d2i_DSAPrivateKey()
67.   #include <openssl/asn1_mac.h>
68.   
69. > DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length)
70.   	{
71.   	int i=ASN1_R_PARSING;

crypto/asn1/d2i_s_pr.c:71:2: 
69.   DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length)
70.   	{
71. > 	int i=ASN1_R_PARSING;
72.   	ASN1_INTEGER *bs=NULL;
73.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);

crypto/asn1/d2i_s_pr.c:72:2: 
70.   	{
71.   	int i=ASN1_R_PARSING;
72. > 	ASN1_INTEGER *bs=NULL;
73.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);
74.   

crypto/asn1/d2i_s_pr.c:73:2: Taking false branch
71.   	int i=ASN1_R_PARSING;
72.   	ASN1_INTEGER *bs=NULL;
73.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);
       ^
74.   
75.   	M_ASN1_D2I_Init();

crypto/asn1/d2i_s_pr.c:73:2: Taking false branch
71.   	int i=ASN1_R_PARSING;
72.   	ASN1_INTEGER *bs=NULL;
73.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);
       ^
74.   
75.   	M_ASN1_D2I_Init();

crypto/asn1/d2i_s_pr.c:75:2: Condition is false
73.   	M_ASN1_D2I_vars(a,DSA *,DSA_new);
74.   
75.   	M_ASN1_D2I_Init();
       ^
76.   	M_ASN1_D2I_start_sequence();
77.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);

crypto/asn1/d2i_s_pr.c:76:2: 
74.   
75.   	M_ASN1_D2I_Init();
76. > 	M_ASN1_D2I_start_sequence();
77.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
78.   	if (bs->length == 0)

crypto/asn1/asn1_lib.c:280:1: start of procedure asn1_GetSequence()
  278.   	}
  279.   
  280. > int asn1_GetSequence(ASN1_CTX *c, long *length)
  281.   	{
  282.   	unsigned char *q;

crypto/asn1/asn1_lib.c:284:2: 
  282.   	unsigned char *q;
  283.   
  284. > 	q=c->p;
  285.   	c->inf=ASN1_get_object(&(c->p),&(c->slen),&(c->tag),&(c->xclass),
  286.   		*length);

crypto/asn1/asn1_lib.c:285:2: Skipping ASN1_get_object(): empty list of specs
  283.   
  284.   	q=c->p;
  285.   	c->inf=ASN1_get_object(&(c->p),&(c->slen),&(c->tag),&(c->xclass),
          ^
  286.   		*length);
  287.   	if (c->inf & 0x80)

crypto/asn1/asn1_lib.c:287:6: Taking false branch
  285.   	c->inf=ASN1_get_object(&(c->p),&(c->slen),&(c->tag),&(c->xclass),
  286.   		*length);
  287.   	if (c->inf & 0x80)
              ^
  288.   		{
  289.   		c->error=ERR_R_BAD_GET_ASN1_OBJECT_CALL;

crypto/asn1/asn1_lib.c:292:6: Taking false branch
  290.   		return(0);
  291.   		}
  292.   	if (c->tag != V_ASN1_SEQUENCE)
              ^
  293.   		{
  294.   		c->error=ERR_R_EXPECTING_AN_ASN1_SEQUENCE;

crypto/asn1/asn1_lib.c:297:2: 
  295.   		return(0);
  296.   		}
  297. > 	(*length)-=(c->p-q);
  298.   	if (c->max && (*length < 0))
  299.   		{

crypto/asn1/asn1_lib.c:298:6: Taking true branch
  296.   		}
  297.   	(*length)-=(c->p-q);
  298.   	if (c->max && (*length < 0))
              ^
  299.   		{
  300.   		c->error=ERR_R_ASN1_LENGTH_MISMATCH;

crypto/asn1/asn1_lib.c:298:17: Taking false branch
  296.   		}
  297.   	(*length)-=(c->p-q);
  298.   	if (c->max && (*length < 0))
                         ^
  299.   		{
  300.   		c->error=ERR_R_ASN1_LENGTH_MISMATCH;

crypto/asn1/asn1_lib.c:303:6: Taking true branch
  301.   		return(0);
  302.   		}
  303.   	if (c->inf == (1|V_ASN1_CONSTRUCTED))
              ^
  304.   		c->slen= *length+ *(c->pp)-c->p;
  305.   	c->eos=0;

crypto/asn1/asn1_lib.c:304:3: 
  302.   		}
  303.   	if (c->inf == (1|V_ASN1_CONSTRUCTED))
  304. > 		c->slen= *length+ *(c->pp)-c->p;
  305.   	c->eos=0;
  306.   	return(1);

crypto/asn1/asn1_lib.c:305:2: 
  303.   	if (c->inf == (1|V_ASN1_CONSTRUCTED))
  304.   		c->slen= *length+ *(c->pp)-c->p;
  305. > 	c->eos=0;
  306.   	return(1);
  307.   	}

crypto/asn1/asn1_lib.c:306:2: 
  304.   		c->slen= *length+ *(c->pp)-c->p;
  305.   	c->eos=0;
  306. > 	return(1);
  307.   	}
  308.   

crypto/asn1/asn1_lib.c:307:2: return from a call to asn1_GetSequence
  305.   	c->eos=0;
  306.   	return(1);
  307.   	}
          ^
  308.   
  309.   ASN1_STRING *ASN1_STRING_dup(ASN1_STRING *str)

crypto/asn1/d2i_s_pr.c:76:2: Taking false branch
74.   
75.   	M_ASN1_D2I_Init();
76.   	M_ASN1_D2I_start_sequence();
       ^
77.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
78.   	if (bs->length == 0)

crypto/asn1/d2i_s_pr.c:77:2: 
75.   	M_ASN1_D2I_Init();
76.   	M_ASN1_D2I_start_sequence();
77. > 	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
78.   	if (bs->length == 0)
79.   		ret->version=0;

crypto/asn1/a_int.c:178:1: start of procedure d2i_ASN1_INTEGER()
  176.   
  177.   /* Convert DER encoded ASN1 INTEGER to ASN1_INTEGER structure */
  178. > ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a, unsigned char **pp,
  179.   	     long length)
  180.   {

crypto/asn1/a_int.c:187:2: 
  185.   	ASN1_INTEGER *ret;
  186.   
  187. > 	p= *pp;
  188.   	inf=ASN1_get_object(&p,&len,&tag,&xclass,length);
  189.   	if (inf & 0x80)

crypto/asn1/a_int.c:188:2: Skipping ASN1_get_object(): empty list of specs
  186.   
  187.   	p= *pp;
  188.   	inf=ASN1_get_object(&p,&len,&tag,&xclass,length);
          ^
  189.   	if (inf & 0x80)
  190.   		{

crypto/asn1/a_int.c:189:6: Taking false branch
  187.   	p= *pp;
  188.   	inf=ASN1_get_object(&p,&len,&tag,&xclass,length);
  189.   	if (inf & 0x80)
              ^
  190.   		{
  191.   		i=ASN1_R_BAD_OBJECT_HEADER;

crypto/asn1/a_int.c:195:6: Taking false branch
  193.   		}
  194.   
  195.   	if (tag != V_ASN1_INTEGER)
              ^
  196.   		{
  197.   		i=ASN1_R_EXPECTING_AN_INTEGER;

crypto/asn1/a_int.c:200:2: Skipping c2i_ASN1_INTEGER(): empty list of specs
  198.   		goto err;
  199.   		}
  200.   	ret = c2i_ASN1_INTEGER(a, &p, len);
          ^
  201.   	if(ret) *pp = p;
  202.   	return ret;

crypto/asn1/a_int.c:201:5: Taking true branch
  199.   		}
  200.   	ret = c2i_ASN1_INTEGER(a, &p, len);
  201.   	if(ret) *pp = p;
             ^
  202.   	return ret;
  203.   err:

crypto/asn1/a_int.c:201:10: 
  199.   		}
  200.   	ret = c2i_ASN1_INTEGER(a, &p, len);
  201. > 	if(ret) *pp = p;
  202.   	return ret;
  203.   err:

crypto/asn1/a_int.c:202:2: 
  200.   	ret = c2i_ASN1_INTEGER(a, &p, len);
  201.   	if(ret) *pp = p;
  202. > 	return ret;
  203.   err:
  204.   	ASN1err(ASN1_F_D2I_ASN1_INTEGER,i);

crypto/asn1/a_int.c:207:1: return from a call to d2i_ASN1_INTEGER
  205.   	return(NULL);
  206.   
  207. > }
  208.   
  209.   

crypto/asn1/d2i_s_pr.c:77:2: Taking false branch
75.   	M_ASN1_D2I_Init();
76.   	M_ASN1_D2I_start_sequence();
77.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
       ^
78.   	if (bs->length == 0)
79.   		ret->version=0;

crypto/asn1/d2i_s_pr.c:78:6: 
76.   	M_ASN1_D2I_start_sequence();
77.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
78. > 	if (bs->length == 0)
79.   		ret->version=0;
80.   	else	ret->version=bs->data[0];
