crypto/x509/x509_vfy.c:616: error: NULL_DEREFERENCE
  pointer `x` last assigned on line 614 could be null and is dereferenced at line 616, column 13.
Showing all 66 steps of the trace


crypto/x509/x509_vfy.c:607:1: start of procedure check_name_constraints()
605.   }
606.   
607. > static int check_name_constraints(X509_STORE_CTX *ctx)
608.   	{
609.   	X509 *x;

crypto/x509/x509_vfy.c:612:11: Condition is true
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                 ^
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:612:7: 
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/stack/stack.c:294:1: start of procedure sk_num()
  292.   	}
  293.   
  294. > int sk_num(const _STACK *st)
  295.   {
  296.   	if(st == NULL) return -1;

crypto/stack/stack.c:296:5: Taking false branch
  294.   int sk_num(const _STACK *st)
  295.   {
  296.   	if(st == NULL) return -1;
             ^
  297.   	return st->num;
  298.   }

crypto/stack/stack.c:297:2: 
  295.   {
  296.   	if(st == NULL) return -1;
  297. > 	return st->num;
  298.   }
  299.   

crypto/stack/stack.c:298:1: return from a call to sk_num
  296.   	if(st == NULL) return -1;
  297.   	return st->num;
  298. > }
  299.   
  300.   void *sk_value(const _STACK *st, int i)

crypto/x509/x509_vfy.c:612:40: Loop condition is true. Entering loop body
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                                              ^
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:614:7: Condition is true
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);
             ^
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:614:3: 
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614. > 		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:303:2: 
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303. > 	return st->data[i];
  304.   }
  305.   

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:616:7: Taking true branch
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))
             ^
617.   			continue;
618.   		/* Check against constraints for all certificates higher in

crypto/x509/x509_vfy.c:616:13: Taking true branch
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))
                   ^
617.   			continue;
618.   		/* Check against constraints for all certificates higher in

crypto/x509/x509_vfy.c:612:48: 
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:612:40: Loop condition is true. Entering loop body
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                                              ^
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:614:7: Condition is true
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);
             ^
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:614:3: 
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614. > 		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:303:2: 
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303. > 	return st->data[i];
  304.   }
  305.   

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:616:7: Taking true branch
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))
             ^
617.   			continue;
618.   		/* Check against constraints for all certificates higher in

crypto/x509/x509_vfy.c:616:13: Taking false branch
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))
                   ^
617.   			continue;
618.   		/* Check against constraints for all certificates higher in

crypto/x509/x509_vfy.c:623:12: Condition is true
621.   		 * assumed it expects them to be obeyed.
622.   		 */
623.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
                  ^
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:623:8: 
621.   		 * assumed it expects them to be obeyed.
622.   		 */
623. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/stack/stack.c:294:1: start of procedure sk_num()
  292.   	}
  293.   
  294. > int sk_num(const _STACK *st)
  295.   {
  296.   	if(st == NULL) return -1;

crypto/stack/stack.c:296:5: Taking false branch
  294.   int sk_num(const _STACK *st)
  295.   {
  296.   	if(st == NULL) return -1;
             ^
  297.   	return st->num;
  298.   }

crypto/stack/stack.c:297:2: 
  295.   {
  296.   	if(st == NULL) return -1;
  297. > 	return st->num;
  298.   }
  299.   

crypto/stack/stack.c:298:1: return from a call to sk_num
  296.   	if(st == NULL) return -1;
  297.   	return st->num;
  298. > }
  299.   
  300.   void *sk_value(const _STACK *st, int i)

crypto/x509/x509_vfy.c:623:41: Loop condition is true. Entering loop body
621.   		 * assumed it expects them to be obeyed.
622.   		 */
623.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
                                               ^
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:625:27: Condition is true
623.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
                                 ^
626.   			if (nc)
627.   				{

crypto/x509/x509_vfy.c:625:4: 
623.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
624.   			{
625. > 			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
626.   			if (nc)
627.   				{

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:303:2: 
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303. > 	return st->data[i];
  304.   }
  305.   

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:626:8: Taking true branch
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
626.   			if (nc)
              ^
627.   				{
628.   				rv = NAME_CONSTRAINTS_check(x, nc);

crypto/x509/x509_vfy.c:628:5: Skipping NAME_CONSTRAINTS_check(): empty list of specs
626.   			if (nc)
627.   				{
628.   				rv = NAME_CONSTRAINTS_check(x, nc);
           ^
629.   				if (rv != X509_V_OK)
630.   					{

crypto/x509/x509_vfy.c:629:9: Taking true branch
627.   				{
628.   				rv = NAME_CONSTRAINTS_check(x, nc);
629.   				if (rv != X509_V_OK)
               ^
630.   					{
631.   					ctx->error = rv;

crypto/x509/x509_vfy.c:631:6: 
629.   				if (rv != X509_V_OK)
630.   					{
631. > 					ctx->error = rv;
632.   					ctx->error_depth = i;
633.   					ctx->current_cert = x;

crypto/x509/x509_vfy.c:632:6: 
630.   					{
631.   					ctx->error = rv;
632. > 					ctx->error_depth = i;
633.   					ctx->current_cert = x;
634.   					if (!ctx->verify_cb(0,ctx))

crypto/x509/x509_vfy.c:633:6: 
631.   					ctx->error = rv;
632.   					ctx->error_depth = i;
633. > 					ctx->current_cert = x;
634.   					if (!ctx->verify_cb(0,ctx))
635.   						return 0;

crypto/x509/x509_vfy.c:634:11: Taking false branch
632.   					ctx->error_depth = i;
633.   					ctx->current_cert = x;
634.   					if (!ctx->verify_cb(0,ctx))
                 ^
635.   						return 0;
636.   					}

crypto/x509/x509_vfy.c:623:48: 
621.   		 * assumed it expects them to be obeyed.
622.   		 */
623. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:623:41: Loop condition is false. Leaving loop
621.   		 * assumed it expects them to be obeyed.
622.   		 */
623.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
                                               ^
624.   			{
625.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:612:48: 
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:612:40: Loop condition is true. Entering loop body
610.   	int i, j, rv;
611.   	/* Check name constraints for all certificates */
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                                              ^
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:614:7: Condition is true
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614.   		x = sk_X509_value(ctx->chain, i);
             ^
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:614:3: 
612.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
613.   		{
614. > 		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking true branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:39: 
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:616:7: Taking true branch
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616.   		if (i && (x->ex_flags & EXFLAG_SI))
             ^
617.   			continue;
618.   		/* Check against constraints for all certificates higher in

crypto/x509/x509_vfy.c:616:13: 
614.   		x = sk_X509_value(ctx->chain, i);
615.   		/* Ignore self issued certs unless last in chain */
616. > 		if (i && (x->ex_flags & EXFLAG_SI))
617.   			continue;
618.   		/* Check against constraints for all certificates higher in
