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


crypto/x509/x509_vfy.c:719:1: start of procedure check_name_constraints()
717.   }
718.   
719. > static int check_name_constraints(X509_STORE_CTX *ctx)
720.   {
721.       X509 *x;

crypto/x509/x509_vfy.c:724:14: Condition is true
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
                    ^
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:724:10: 
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724. >     for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/stack/stack.c:327:1: start of procedure sk_num()
  325.   }
  326.   
  327. > int sk_num(const _STACK *st)
  328.   {
  329.       if (st == NULL)

crypto/stack/stack.c:329:9: Taking false branch
  327.   int sk_num(const _STACK *st)
  328.   {
  329.       if (st == NULL)
                 ^
  330.           return -1;
  331.       return st->num;

crypto/stack/stack.c:331:5: 
  329.       if (st == NULL)
  330.           return -1;
  331. >     return st->num;
  332.   }
  333.   

crypto/stack/stack.c:332:1: return from a call to sk_num
  330.           return -1;
  331.       return st->num;
  332. > }
  333.   
  334.   void *sk_value(const _STACK *st, int i)

crypto/x509/x509_vfy.c:724:43: Loop condition is true. Entering loop body
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
                                                 ^
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:725:13: Condition is true
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
                   ^
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:725:9: 
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725. >         x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:334:1: start of procedure sk_value()
  332.   }
  333.   
  334. > void *sk_value(const _STACK *st, int i)
  335.   {
  336.       if (!st || (i < 0) || (i >= st->num))

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

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

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

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

crypto/stack/stack.c:339:1: return from a call to sk_value
  337.           return NULL;
  338.       return st->data[i];
  339. > }
  340.   
  341.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:727:13: Taking true branch
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))
                   ^
728.               continue;
729.           /*

crypto/x509/x509_vfy.c:727:19: Taking true branch
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))
                         ^
728.               continue;
729.           /*

crypto/x509/x509_vfy.c:724:51: 
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724. >     for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:724:43: Loop condition is true. Entering loop body
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
                                                 ^
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:725:13: Condition is true
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
                   ^
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:725:9: 
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725. >         x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:334:1: start of procedure sk_value()
  332.   }
  333.   
  334. > void *sk_value(const _STACK *st, int i)
  335.   {
  336.       if (!st || (i < 0) || (i >= st->num))

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

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

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

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

crypto/stack/stack.c:339:1: return from a call to sk_value
  337.           return NULL;
  338.       return st->data[i];
  339. > }
  340.   
  341.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:727:13: Taking true branch
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))
                   ^
728.               continue;
729.           /*

crypto/x509/x509_vfy.c:727:19: Taking false branch
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))
                         ^
728.               continue;
729.           /*

crypto/x509/x509_vfy.c:735:18: Condition is true
733.            * to be obeyed.
734.            */
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
                        ^
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {

crypto/x509/x509_vfy.c:735:14: 
733.            * to be obeyed.
734.            */
735. >         for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {

crypto/stack/stack.c:327:1: start of procedure sk_num()
  325.   }
  326.   
  327. > int sk_num(const _STACK *st)
  328.   {
  329.       if (st == NULL)

crypto/stack/stack.c:329:9: Taking false branch
  327.   int sk_num(const _STACK *st)
  328.   {
  329.       if (st == NULL)
                 ^
  330.           return -1;
  331.       return st->num;

crypto/stack/stack.c:331:5: 
  329.       if (st == NULL)
  330.           return -1;
  331. >     return st->num;
  332.   }
  333.   

crypto/stack/stack.c:332:1: return from a call to sk_num
  330.           return -1;
  331.       return st->num;
  332. > }
  333.   
  334.   void *sk_value(const _STACK *st, int i)

crypto/x509/x509_vfy.c:735:47: Loop condition is true. Entering loop body
733.            * to be obeyed.
734.            */
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
                                                     ^
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {

crypto/x509/x509_vfy.c:736:36: Condition is true
734.            */
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
                                          ^
737.               if (nc) {
738.                   rv = NAME_CONSTRAINTS_check(x, nc);

crypto/x509/x509_vfy.c:736:13: 
734.            */
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
736. >             NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {
738.                   rv = NAME_CONSTRAINTS_check(x, nc);

crypto/stack/stack.c:334:1: start of procedure sk_value()
  332.   }
  333.   
  334. > void *sk_value(const _STACK *st, int i)
  335.   {
  336.       if (!st || (i < 0) || (i >= st->num))

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

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

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

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

crypto/stack/stack.c:339:1: return from a call to sk_value
  337.           return NULL;
  338.       return st->data[i];
  339. > }
  340.   
  341.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:737:17: Taking true branch
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {
                       ^
738.                   rv = NAME_CONSTRAINTS_check(x, nc);
739.                   if (rv != X509_V_OK) {

crypto/x509/x509_vfy.c:738:17: Skipping NAME_CONSTRAINTS_check(): empty list of specs
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {
738.                   rv = NAME_CONSTRAINTS_check(x, nc);
                       ^
739.                   if (rv != X509_V_OK) {
740.                       ctx->error = rv;

crypto/x509/x509_vfy.c:739:21: Taking true branch
737.               if (nc) {
738.                   rv = NAME_CONSTRAINTS_check(x, nc);
739.                   if (rv != X509_V_OK) {
                           ^
740.                       ctx->error = rv;
741.                       ctx->error_depth = i;

crypto/x509/x509_vfy.c:740:21: 
738.                   rv = NAME_CONSTRAINTS_check(x, nc);
739.                   if (rv != X509_V_OK) {
740. >                     ctx->error = rv;
741.                       ctx->error_depth = i;
742.                       ctx->current_cert = x;

crypto/x509/x509_vfy.c:741:21: 
739.                   if (rv != X509_V_OK) {
740.                       ctx->error = rv;
741. >                     ctx->error_depth = i;
742.                       ctx->current_cert = x;
743.                       if (!ctx->verify_cb(0, ctx))

crypto/x509/x509_vfy.c:742:21: 
740.                       ctx->error = rv;
741.                       ctx->error_depth = i;
742. >                     ctx->current_cert = x;
743.                       if (!ctx->verify_cb(0, ctx))
744.                           return 0;

crypto/x509/x509_vfy.c:743:26: Taking false branch
741.                       ctx->error_depth = i;
742.                       ctx->current_cert = x;
743.                       if (!ctx->verify_cb(0, ctx))
                                ^
744.                           return 0;
745.                   }

crypto/x509/x509_vfy.c:735:54: 
733.            * to be obeyed.
734.            */
735. >         for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {

crypto/x509/x509_vfy.c:735:47: Loop condition is false. Leaving loop
733.            * to be obeyed.
734.            */
735.           for (j = sk_X509_num(ctx->chain) - 1; j > i; j--) {
                                                     ^
736.               NAME_CONSTRAINTS *nc = sk_X509_value(ctx->chain, j)->nc;
737.               if (nc) {

crypto/x509/x509_vfy.c:724:51: 
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724. >     for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:724:43: Loop condition is true. Entering loop body
722.       int i, j, rv;
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
                                                 ^
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */

crypto/x509/x509_vfy.c:725:13: Condition is true
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725.           x = sk_X509_value(ctx->chain, i);
                   ^
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/x509/x509_vfy.c:725:9: 
723.       /* Check name constraints for all certificates */
724.       for (i = sk_X509_num(ctx->chain) - 1; i >= 0; i--) {
725. >         x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))

crypto/stack/stack.c:334:1: start of procedure sk_value()
  332.   }
  333.   
  334. > void *sk_value(const _STACK *st, int i)
  335.   {
  336.       if (!st || (i < 0) || (i >= st->num))

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

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

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

crypto/stack/stack.c:337:9: 
  335.   {
  336.       if (!st || (i < 0) || (i >= st->num))
  337. >         return NULL;
  338.       return st->data[i];
  339.   }

crypto/stack/stack.c:339:1: return from a call to sk_value
  337.           return NULL;
  338.       return st->data[i];
  339. > }
  340.   
  341.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_vfy.c:727:13: Taking true branch
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727.           if (i && (x->ex_flags & EXFLAG_SI))
                   ^
728.               continue;
729.           /*

crypto/x509/x509_vfy.c:727:19: 
725.           x = sk_X509_value(ctx->chain, i);
726.           /* Ignore self issued certs unless last in chain */
727. >         if (i && (x->ex_flags & EXFLAG_SI))
728.               continue;
729.           /*
