crypto/dsa/dsa_asn1.c:81: error: NULL_DEREFERENCE
  pointer `bs` last assigned on line 75 could be null and is dereferenced at line 81, column 24.
Showing all 34 steps of the trace


crypto/dsa/dsa_asn1.c:72:1: start of procedure d2i_DSA_SIG()
70.   }
71.   
72. > DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length)
73.   {
74.   	int i=ERR_R_NESTED_ASN1_ERROR;

crypto/dsa/dsa_asn1.c:74:2: 
72.   DSA_SIG *d2i_DSA_SIG(DSA_SIG **a, unsigned char **pp, long length)
73.   {
74. > 	int i=ERR_R_NESTED_ASN1_ERROR;
75.   	ASN1_INTEGER *bs=NULL;
76.   	M_ASN1_D2I_vars(a,DSA_SIG *,DSA_SIG_new);

crypto/dsa/dsa_asn1.c:75:2: 
73.   {
74.   	int i=ERR_R_NESTED_ASN1_ERROR;
75. > 	ASN1_INTEGER *bs=NULL;
76.   	M_ASN1_D2I_vars(a,DSA_SIG *,DSA_SIG_new);
77.   

crypto/dsa/dsa_asn1.c:76:2: Taking false branch
74.   	int i=ERR_R_NESTED_ASN1_ERROR;
75.   	ASN1_INTEGER *bs=NULL;
76.   	M_ASN1_D2I_vars(a,DSA_SIG *,DSA_SIG_new);
       ^
77.   
78.   	M_ASN1_D2I_Init();

crypto/dsa/dsa_asn1.c:76:2: Taking false branch
74.   	int i=ERR_R_NESTED_ASN1_ERROR;
75.   	ASN1_INTEGER *bs=NULL;
76.   	M_ASN1_D2I_vars(a,DSA_SIG *,DSA_SIG_new);
       ^
77.   
78.   	M_ASN1_D2I_Init();

crypto/dsa/dsa_asn1.c:78:2: Condition is false
76.   	M_ASN1_D2I_vars(a,DSA_SIG *,DSA_SIG_new);
77.   
78.   	M_ASN1_D2I_Init();
       ^
79.   	M_ASN1_D2I_start_sequence();
80.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);

crypto/dsa/dsa_asn1.c:79:2: 
77.   
78.   	M_ASN1_D2I_Init();
79. > 	M_ASN1_D2I_start_sequence();
80.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
81.   	if ((ret->r=BN_bin2bn(bs->data,bs->length,ret->r)) == NULL)

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/dsa/dsa_asn1.c:79:2: Taking false branch
77.   
78.   	M_ASN1_D2I_Init();
79.   	M_ASN1_D2I_start_sequence();
       ^
80.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
81.   	if ((ret->r=BN_bin2bn(bs->data,bs->length,ret->r)) == NULL)

crypto/dsa/dsa_asn1.c:80:2: 
78.   	M_ASN1_D2I_Init();
79.   	M_ASN1_D2I_start_sequence();
80. > 	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
81.   	if ((ret->r=BN_bin2bn(bs->data,bs->length,ret->r)) == NULL)
82.   		goto err_bn;

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

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

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

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

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

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

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

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

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

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

crypto/dsa/dsa_asn1.c:80:2: Taking false branch
78.   	M_ASN1_D2I_Init();
79.   	M_ASN1_D2I_start_sequence();
80.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
       ^
81.   	if ((ret->r=BN_bin2bn(bs->data,bs->length,ret->r)) == NULL)
82.   		goto err_bn;

crypto/dsa/dsa_asn1.c:81:6: 
79.   	M_ASN1_D2I_start_sequence();
80.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
81. > 	if ((ret->r=BN_bin2bn(bs->data,bs->length,ret->r)) == NULL)
82.   		goto err_bn;
83.   	M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER);
