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


crypto/x509/x509_vfy.c:703:1: start of procedure check_name_constraints()
701.   }
702.   
703. > static int check_name_constraints(X509_STORE_CTX *ctx)
704.   	{
705.   	X509 *x;

crypto/x509/x509_vfy.c:708:11: Condition is true
706.   	int i, j, rv;
707.   	/* Check name constraints for all certificates */
708.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                 ^
709.   		{
710.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:708:7: 
706.   	int i, j, rv;
707.   	/* Check name constraints for all certificates */
708. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710.   		x = sk_X509_value(ctx->chain, i);

crypto/stack/stack.c:331:1: start of procedure sk_num()
  329.   	}
  330.   
  331. > int sk_num(const _STACK *st)
  332.   {
  333.   	if(st == NULL) return -1;

crypto/stack/stack.c:333:5: Taking false branch
  331.   int sk_num(const _STACK *st)
  332.   {
  333.   	if(st == NULL) return -1;
             ^
  334.   	return st->num;
  335.   }

crypto/stack/stack.c:334:2: 
  332.   {
  333.   	if(st == NULL) return -1;
  334. > 	return st->num;
  335.   }
  336.   

crypto/stack/stack.c:335:1: return from a call to sk_num
  333.   	if(st == NULL) return -1;
  334.   	return st->num;
  335. > }
  336.   
  337.   void *sk_value(const _STACK *st, int i)

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

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

crypto/x509/x509_vfy.c:710:3: 
708.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710. > 		x = sk_X509_value(ctx->chain, i);
711.   		/* Ignore self issued certs unless last in chain */
712.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:337:1: start of procedure sk_value()
  335.   }
  336.   
  337. > void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:339:6: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:13: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:24: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:340:2: 
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340. > 	return st->data[i];
  341.   }
  342.   

crypto/stack/stack.c:341:1: return from a call to sk_value
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340.   	return st->data[i];
  341. > }
  342.   
  343.   void *sk_set(_STACK *st, int i, void *value)

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

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

crypto/x509/x509_vfy.c:708:48: 
706.   	int i, j, rv;
707.   	/* Check name constraints for all certificates */
708. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710.   		x = sk_X509_value(ctx->chain, i);

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

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

crypto/x509/x509_vfy.c:710:3: 
708.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710. > 		x = sk_X509_value(ctx->chain, i);
711.   		/* Ignore self issued certs unless last in chain */
712.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:337:1: start of procedure sk_value()
  335.   }
  336.   
  337. > void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:339:6: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:13: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:24: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:340:2: 
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340. > 	return st->data[i];
  341.   }
  342.   

crypto/stack/stack.c:341:1: return from a call to sk_value
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340.   	return st->data[i];
  341. > }
  342.   
  343.   void *sk_set(_STACK *st, int i, void *value)

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

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

crypto/x509/x509_vfy.c:719:12: Condition is true
717.   		 * assumed it expects them to be obeyed.
718.   		 */
719.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
                  ^
720.   			{
721.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:719:8: 
717.   		 * assumed it expects them to be obeyed.
718.   		 */
719. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
720.   			{
721.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/stack/stack.c:331:1: start of procedure sk_num()
  329.   	}
  330.   
  331. > int sk_num(const _STACK *st)
  332.   {
  333.   	if(st == NULL) return -1;

crypto/stack/stack.c:333:5: Taking false branch
  331.   int sk_num(const _STACK *st)
  332.   {
  333.   	if(st == NULL) return -1;
             ^
  334.   	return st->num;
  335.   }

crypto/stack/stack.c:334:2: 
  332.   {
  333.   	if(st == NULL) return -1;
  334. > 	return st->num;
  335.   }
  336.   

crypto/stack/stack.c:335:1: return from a call to sk_num
  333.   	if(st == NULL) return -1;
  334.   	return st->num;
  335. > }
  336.   
  337.   void *sk_value(const _STACK *st, int i)

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

crypto/x509/x509_vfy.c:721:27: Condition is true
719.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
720.   			{
721.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
                                 ^
722.   			if (nc)
723.   				{

crypto/x509/x509_vfy.c:721:4: 
719.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
720.   			{
721. > 			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
722.   			if (nc)
723.   				{

crypto/stack/stack.c:337:1: start of procedure sk_value()
  335.   }
  336.   
  337. > void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:339:6: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:13: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:24: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:340:2: 
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340. > 	return st->data[i];
  341.   }
  342.   

crypto/stack/stack.c:341:1: return from a call to sk_value
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340.   	return st->data[i];
  341. > }
  342.   
  343.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:722:8: Taking true branch
720.   			{
721.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
722.   			if (nc)
              ^
723.   				{
724.   				rv = NAME_CONSTRAINTS_check(x, nc);

crypto/x509/x509_vfy.c:724:5: Skipping NAME_CONSTRAINTS_check(): empty list of specs
722.   			if (nc)
723.   				{
724.   				rv = NAME_CONSTRAINTS_check(x, nc);
           ^
725.   				if (rv != X509_V_OK)
726.   					{

crypto/x509/x509_vfy.c:725:9: Taking true branch
723.   				{
724.   				rv = NAME_CONSTRAINTS_check(x, nc);
725.   				if (rv != X509_V_OK)
               ^
726.   					{
727.   					ctx->error = rv;

crypto/x509/x509_vfy.c:727:6: 
725.   				if (rv != X509_V_OK)
726.   					{
727. > 					ctx->error = rv;
728.   					ctx->error_depth = i;
729.   					ctx->current_cert = x;

crypto/x509/x509_vfy.c:728:6: 
726.   					{
727.   					ctx->error = rv;
728. > 					ctx->error_depth = i;
729.   					ctx->current_cert = x;
730.   					if (!ctx->verify_cb(0,ctx))

crypto/x509/x509_vfy.c:729:6: 
727.   					ctx->error = rv;
728.   					ctx->error_depth = i;
729. > 					ctx->current_cert = x;
730.   					if (!ctx->verify_cb(0,ctx))
731.   						return 0;

crypto/x509/x509_vfy.c:730:11: Taking false branch
728.   					ctx->error_depth = i;
729.   					ctx->current_cert = x;
730.   					if (!ctx->verify_cb(0,ctx))
                 ^
731.   						return 0;
732.   					}

crypto/x509/x509_vfy.c:719:48: 
717.   		 * assumed it expects them to be obeyed.
718.   		 */
719. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
720.   			{
721.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

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

crypto/x509/x509_vfy.c:708:48: 
706.   	int i, j, rv;
707.   	/* Check name constraints for all certificates */
708. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710.   		x = sk_X509_value(ctx->chain, i);

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

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

crypto/x509/x509_vfy.c:710:3: 
708.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
709.   		{
710. > 		x = sk_X509_value(ctx->chain, i);
711.   		/* Ignore self issued certs unless last in chain */
712.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:337:1: start of procedure sk_value()
  335.   }
  336.   
  337. > void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:339:6: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:13: Taking false branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:24: Taking true branch
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:339:39: 
  337.   void *sk_value(const _STACK *st, int i)
  338.   {
  339. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340.   	return st->data[i];
  341.   }

crypto/stack/stack.c:341:1: return from a call to sk_value
  339.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  340.   	return st->data[i];
  341. > }
  342.   
  343.   void *sk_set(_STACK *st, int i, void *value)

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

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