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


crypto/x509/x509_vfy.c:612:1: start of procedure check_name_constraints()
610.   }
611.   
612. > static int check_name_constraints(X509_STORE_CTX *ctx)
613.   	{
614.   	X509 *x;

crypto/x509/x509_vfy.c:617:11: Condition is true
615.   	int i, j, rv;
616.   	/* Check name constraints for all certificates */
617.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
                 ^
618.   		{
619.   		x = sk_X509_value(ctx->chain, i);

crypto/x509/x509_vfy.c:617:7: 
615.   	int i, j, rv;
616.   	/* Check name constraints for all certificates */
617. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619.   		x = sk_X509_value(ctx->chain, i);

crypto/stack/stack.c:302:1: start of procedure sk_num()
  300.   	}
  301.   
  302. > int sk_num(const _STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;

crypto/stack/stack.c:304:5: Taking false branch
  302.   int sk_num(const _STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;
             ^
  305.   	return st->num;
  306.   }

crypto/stack/stack.c:305:2: 
  303.   {
  304.   	if(st == NULL) return -1;
  305. > 	return st->num;
  306.   }
  307.   

crypto/stack/stack.c:306:1: return from a call to sk_num
  304.   	if(st == NULL) return -1;
  305.   	return st->num;
  306. > }
  307.   
  308.   void *sk_value(const _STACK *st, int i)

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

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

crypto/x509/x509_vfy.c:619:3: 
617.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619. > 		x = sk_X509_value(ctx->chain, i);
620.   		/* Ignore self issued certs unless last in chain */
621.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:310:6: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:13: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:24: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:311:2: 
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311. > 	return st->data[i];
  312.   }
  313.   

crypto/stack/stack.c:312:1: return from a call to sk_value
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312. > }
  313.   
  314.   void *sk_set(_STACK *st, int i, void *value)

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

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

crypto/x509/x509_vfy.c:617:48: 
615.   	int i, j, rv;
616.   	/* Check name constraints for all certificates */
617. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619.   		x = sk_X509_value(ctx->chain, i);

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

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

crypto/x509/x509_vfy.c:619:3: 
617.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619. > 		x = sk_X509_value(ctx->chain, i);
620.   		/* Ignore self issued certs unless last in chain */
621.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:310:6: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:13: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:24: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:311:2: 
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311. > 	return st->data[i];
  312.   }
  313.   

crypto/stack/stack.c:312:1: return from a call to sk_value
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312. > }
  313.   
  314.   void *sk_set(_STACK *st, int i, void *value)

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

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

crypto/x509/x509_vfy.c:628:12: Condition is true
626.   		 * assumed it expects them to be obeyed.
627.   		 */
628.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
                  ^
629.   			{
630.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/x509/x509_vfy.c:628:8: 
626.   		 * assumed it expects them to be obeyed.
627.   		 */
628. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
629.   			{
630.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

crypto/stack/stack.c:302:1: start of procedure sk_num()
  300.   	}
  301.   
  302. > int sk_num(const _STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;

crypto/stack/stack.c:304:5: Taking false branch
  302.   int sk_num(const _STACK *st)
  303.   {
  304.   	if(st == NULL) return -1;
             ^
  305.   	return st->num;
  306.   }

crypto/stack/stack.c:305:2: 
  303.   {
  304.   	if(st == NULL) return -1;
  305. > 	return st->num;
  306.   }
  307.   

crypto/stack/stack.c:306:1: return from a call to sk_num
  304.   	if(st == NULL) return -1;
  305.   	return st->num;
  306. > }
  307.   
  308.   void *sk_value(const _STACK *st, int i)

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

crypto/x509/x509_vfy.c:630:27: Condition is true
628.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
629.   			{
630.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
                                 ^
631.   			if (nc)
632.   				{

crypto/x509/x509_vfy.c:630:4: 
628.   		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
629.   			{
630. > 			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
631.   			if (nc)
632.   				{

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:310:6: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:13: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:24: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:311:2: 
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311. > 	return st->data[i];
  312.   }
  313.   

crypto/stack/stack.c:312:1: return from a call to sk_value
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312. > }
  313.   
  314.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:631:8: Taking true branch
629.   			{
630.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
631.   			if (nc)
              ^
632.   				{
633.   				rv = NAME_CONSTRAINTS_check(x, nc);

crypto/x509/x509_vfy.c:633:5: Skipping NAME_CONSTRAINTS_check(): empty list of specs
631.   			if (nc)
632.   				{
633.   				rv = NAME_CONSTRAINTS_check(x, nc);
           ^
634.   				if (rv != X509_V_OK)
635.   					{

crypto/x509/x509_vfy.c:634:9: Taking true branch
632.   				{
633.   				rv = NAME_CONSTRAINTS_check(x, nc);
634.   				if (rv != X509_V_OK)
               ^
635.   					{
636.   					ctx->error = rv;

crypto/x509/x509_vfy.c:636:6: 
634.   				if (rv != X509_V_OK)
635.   					{
636. > 					ctx->error = rv;
637.   					ctx->error_depth = i;
638.   					ctx->current_cert = x;

crypto/x509/x509_vfy.c:637:6: 
635.   					{
636.   					ctx->error = rv;
637. > 					ctx->error_depth = i;
638.   					ctx->current_cert = x;
639.   					if (!ctx->verify_cb(0,ctx))

crypto/x509/x509_vfy.c:638:6: 
636.   					ctx->error = rv;
637.   					ctx->error_depth = i;
638. > 					ctx->current_cert = x;
639.   					if (!ctx->verify_cb(0,ctx))
640.   						return 0;

crypto/x509/x509_vfy.c:639:11: Taking false branch
637.   					ctx->error_depth = i;
638.   					ctx->current_cert = x;
639.   					if (!ctx->verify_cb(0,ctx))
                 ^
640.   						return 0;
641.   					}

crypto/x509/x509_vfy.c:628:48: 
626.   		 * assumed it expects them to be obeyed.
627.   		 */
628. > 		for (j = sk_X509_num(ctx->chain) - 1; j > i; j--)
629.   			{
630.   			NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;

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

crypto/x509/x509_vfy.c:617:48: 
615.   	int i, j, rv;
616.   	/* Check name constraints for all certificates */
617. > 	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619.   		x = sk_X509_value(ctx->chain, i);

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

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

crypto/x509/x509_vfy.c:619:3: 
617.   	for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--)
618.   		{
619. > 		x = sk_X509_value(ctx->chain, i);
620.   		/* Ignore self issued certs unless last in chain */
621.   		if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:308:1: start of procedure sk_value()
  306.   }
  307.   
  308. > void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:310:6: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:13: Taking false branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:24: Taking true branch
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:310:39: 
  308.   void *sk_value(const _STACK *st, int i)
  309.   {
  310. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312.   }

crypto/stack/stack.c:312:1: return from a call to sk_value
  310.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  311.   	return st->data[i];
  312. > }
  313.   
  314.   void *sk_set(_STACK *st, int i, void *value)

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

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