crypto/x509/x509_vfy.c:960: error: NULL_DEREFERENCE
  pointer `xs` last assigned on line 952 could be null and is dereferenced at line 960, column 8.
Showing all 32 steps of the trace


crypto/x509/x509_vfy.c:923:1: start of procedure internal_verify()
921.   	}
922.   
923. > static int internal_verify(X509_STORE_CTX *ctx)
924.   	{
925.   	int ok=0,n;

crypto/x509/x509_vfy.c:925:2: 
923.   static int internal_verify(X509_STORE_CTX *ctx)
924.   	{
925. > 	int ok=0,n;
926.   	X509 *xs,*xi;
927.   	EVP_PKEY *pkey=NULL;

crypto/x509/x509_vfy.c:927:2: 
925.   	int ok=0,n;
926.   	X509 *xs,*xi;
927. > 	EVP_PKEY *pkey=NULL;
928.   	int (*cb)();
929.   

crypto/x509/x509_vfy.c:930:2: 
928.   	int (*cb)();
929.   
930. > 	cb=ctx->verify_cb;
931.   
932.   	n=sk_X509_num(ctx->chain);

crypto/x509/x509_vfy.c:932:2: 
930.   	cb=ctx->verify_cb;
931.   
932. > 	n=sk_X509_num(ctx->chain);
933.   	ctx->error_depth=n-1;
934.   	n--;

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

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

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

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

crypto/x509/x509_vfy.c:933:2: 
931.   
932.   	n=sk_X509_num(ctx->chain);
933. > 	ctx->error_depth=n-1;
934.   	n--;
935.   	xi=sk_X509_value(ctx->chain,n);

crypto/x509/x509_vfy.c:934:2: 
932.   	n=sk_X509_num(ctx->chain);
933.   	ctx->error_depth=n-1;
934. > 	n--;
935.   	xi=sk_X509_value(ctx->chain,n);
936.   

crypto/x509/x509_vfy.c:935:2: 
933.   	ctx->error_depth=n-1;
934.   	n--;
935. > 	xi=sk_X509_value(ctx->chain,n);
936.   
937.   	if (ctx->check_issued(ctx, xi, xi))

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

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

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

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

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

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

crypto/x509/x509_vfy.c:937:6: Taking false branch
935.   	xi=sk_X509_value(ctx->chain,n);
936.   
937.   	if (ctx->check_issued(ctx, xi, xi))
            ^
938.   		xs=xi;
939.   	else

crypto/x509/x509_vfy.c:941:7: Taking false branch
939.   	else
940.   		{
941.   		if (n <= 0)
             ^
942.   			{
943.   			ctx->error=X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE;

crypto/x509/x509_vfy.c:950:4: 
948.   		else
949.   			{
950. > 			n--;
951.   			ctx->error_depth=n;
952.   			xs=sk_X509_value(ctx->chain,n);

crypto/x509/x509_vfy.c:951:4: 
949.   			{
950.   			n--;
951. > 			ctx->error_depth=n;
952.   			xs=sk_X509_value(ctx->chain,n);
953.   			}

crypto/x509/x509_vfy.c:952:4: 
950.   			n--;
951.   			ctx->error_depth=n;
952. > 			xs=sk_X509_value(ctx->chain,n);
953.   			}
954.   		}

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

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

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

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

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

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

crypto/x509/x509_vfy.c:957:9: Loop condition is true. Entering loop body
955.   
956.   /*	ctx->error=0;  not needed */
957.   	while (n >= 0)
               ^
958.   		{
959.   		ctx->error_depth=n;

crypto/x509/x509_vfy.c:959:3: 
957.   	while (n >= 0)
958.   		{
959. > 		ctx->error_depth=n;
960.   		if (!xs->valid)
961.   			{

crypto/x509/x509_vfy.c:960:8: Taking false branch
958.   		{
959.   		ctx->error_depth=n;
960.   		if (!xs->valid)
              ^
961.   			{
962.   			if ((pkey=X509_get_pubkey(xi)) == NULL)
