crypto/x509/x509_vfy.c:765: error: NULL_DEREFERENCE
  pointer `crl_issuer` last assigned on line 759 could be null and is dereferenced at line 765, column 6.
Showing all 21 steps of the trace


crypto/x509/x509_vfy.c:751:1: start of procedure crl_akid_check()
749.   	}
750.   
751. > static int crl_akid_check(X509_STORE_CTX *ctx, X509_CRL *crl, X509 **pissuer)
752.   	{
753.   	X509 *crl_issuer;

crypto/x509/x509_vfy.c:754:2: 
752.   	{
753.   	X509 *crl_issuer;
754. > 	int cidx = ctx->error_depth;
755.   	if (!crl->akid)
756.   		return 1;

crypto/x509/x509_vfy.c:755:7: Taking false branch
753.   	X509 *crl_issuer;
754.   	int cidx = ctx->error_depth;
755.   	if (!crl->akid)
             ^
756.   		return 1;
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)

crypto/x509/x509_vfy.c:757:14: Condition is true
755.   	if (!crl->akid)
756.   		return 1;
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)
                    ^
758.   		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);

crypto/x509/x509_vfy.c:757:6: 
755.   	if (!crl->akid)
756.   		return 1;
757. > 	if (cidx != sk_X509_num(ctx->chain) - 1)
758.   		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);

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:757:6: Taking true branch
755.   	if (!crl->akid)
756.   		return 1;
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)
            ^
758.   		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);

crypto/x509/x509_vfy.c:758:3: 
756.   		return 1;
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)
758. > 		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);
760.   	if (X509_check_akid(crl_issuer, crl->akid) == X509_V_OK)

crypto/x509/x509_vfy.c:759:15: Condition is true
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)
758.   		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);
                     ^
760.   	if (X509_check_akid(crl_issuer, crl->akid) == X509_V_OK)
761.   		return 1;

crypto/x509/x509_vfy.c:759:2: 
757.   	if (cidx != sk_X509_num(ctx->chain) - 1)
758.   		cidx++;
759. > 	crl_issuer = sk_X509_value(ctx->chain, cidx);
760.   	if (X509_check_akid(crl_issuer, crl->akid) == X509_V_OK)
761.   		return 1;

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:760:6: Taking false branch
758.   		cidx++;
759.   	crl_issuer = sk_X509_value(ctx->chain, cidx);
760.   	if (X509_check_akid(crl_issuer, crl->akid) == X509_V_OK)
            ^
761.   		return 1;
762.   	/* If crl_issuer is self issued we may get a match further along the

crypto/x509/x509_vfy.c:765:6: 
763.   	 * chain.
764.   	 */
765. > 	if (crl_issuer->ex_flags & EXFLAG_SI)
766.   		{
767.   		for (cidx++; cidx < sk_X509_num(ctx->chain); cidx++)
