crypto/x509/x509_vfy.c:404: error: NULL_DEREFERENCE
  pointer `xi` last assigned on line 403 could be null and is dereferenced by call to `X509_get_subject_name()` at line 404, column 20.
Showing all 21 steps of the trace


crypto/x509/x509_vfy.c:390:1: start of procedure internal_verify()
388.   }
389.   
390. > static int internal_verify(X509_STORE_CTX *ctx)
391.   	{
392.   	int i,ok=0,n;

crypto/x509/x509_vfy.c:392:2: 
390.   static int internal_verify(X509_STORE_CTX *ctx)
391.   	{
392. > 	int i,ok=0,n;
393.   	X509 *xs,*xi;
394.   	EVP_PKEY *pkey=NULL;

crypto/x509/x509_vfy.c:394:2: 
392.   	int i,ok=0,n;
393.   	X509 *xs,*xi;
394. > 	EVP_PKEY *pkey=NULL;
395.   	int (*cb)();
396.   

crypto/x509/x509_vfy.c:397:2: 
395.   	int (*cb)();
396.   
397. > 	cb=ctx->ctx->verify_cb;
398.   	if (cb == NULL) cb=null_callback;
399.   

crypto/x509/x509_vfy.c:398:6: Taking false branch
396.   
397.   	cb=ctx->ctx->verify_cb;
398.   	if (cb == NULL) cb=null_callback;
            ^
399.   
400.   	n=sk_X509_num(ctx->chain);

crypto/x509/x509_vfy.c:400:2: 
398.   	if (cb == NULL) cb=null_callback;
399.   
400. > 	n=sk_X509_num(ctx->chain);
401.   	ctx->error_depth=n-1;
402.   	n--;

crypto/x509/x509_vfy.c:786:1: start of procedure sk_X509_num()
  784.   
  785.   
  786. > IMPLEMENT_STACK_OF(X509)
  787.   IMPLEMENT_ASN1_SET_OF(X509)
  788.   

crypto/x509/x509_vfy.c:786:1: Condition is false
  784.   
  785.   
  786. > IMPLEMENT_STACK_OF(X509)
  787.   IMPLEMENT_ASN1_SET_OF(X509)
  788.   

crypto/x509/x509_vfy.c:786:1: return from a call to sk_X509_num
  784.   
  785.   
  786. > IMPLEMENT_STACK_OF(X509)
  787.   IMPLEMENT_ASN1_SET_OF(X509)
  788.   

crypto/x509/x509_vfy.c:401:2: 
399.   
400.   	n=sk_X509_num(ctx->chain);
401. > 	ctx->error_depth=n-1;
402.   	n--;
403.   	xi=sk_X509_value(ctx->chain,n);

crypto/x509/x509_vfy.c:402:2: 
400.   	n=sk_X509_num(ctx->chain);
401.   	ctx->error_depth=n-1;
402. > 	n--;
403.   	xi=sk_X509_value(ctx->chain,n);
404.   	if (X509_NAME_cmp(X509_get_subject_name(xi),

crypto/x509/x509_vfy.c:403:2: 
401.   	ctx->error_depth=n-1;
402.   	n--;
403. > 	xi=sk_X509_value(ctx->chain,n);
404.   	if (X509_NAME_cmp(X509_get_subject_name(xi),
405.   		X509_get_issuer_name(xi)) == 0)

crypto/x509/x509_vfy.c:786:1: start of procedure sk_X509_value()
  784.   
  785.   
  786. > IMPLEMENT_STACK_OF(X509)
  787.   IMPLEMENT_ASN1_SET_OF(X509)
  788.   

crypto/stack/stack.c:289:1: start of procedure sk_value()
    287.   }
    288.   
    289. > char *sk_value(STACK *st, int i)
    290.   {
    291.   	if(st == NULL) return NULL;

crypto/stack/stack.c:291:5: Taking true branch
    289.   char *sk_value(STACK *st, int i)
    290.   {
    291.   	if(st == NULL) return NULL;
               ^
    292.   	return st->data[i];
    293.   }

crypto/stack/stack.c:291:17: 
    289.   char *sk_value(STACK *st, int i)
    290.   {
    291. > 	if(st == NULL) return NULL;
    292.   	return st->data[i];
    293.   }

crypto/stack/stack.c:293:1: return from a call to sk_value
    291.   	if(st == NULL) return NULL;
    292.   	return st->data[i];
    293. > }
    294.   
    295.   char *sk_set(STACK *st, int i, char *value)

crypto/x509/x509_vfy.c:786:1: return from a call to sk_X509_value
  784.   
  785.   
  786. > IMPLEMENT_STACK_OF(X509)
  787.   IMPLEMENT_ASN1_SET_OF(X509)
  788.   

crypto/x509/x509_vfy.c:404:6: 
402.   	n--;
403.   	xi=sk_X509_value(ctx->chain,n);
404. > 	if (X509_NAME_cmp(X509_get_subject_name(xi),
405.   		X509_get_issuer_name(xi)) == 0)
406.   		xs=xi;

crypto/x509/x509_cmp.c:125:1: start of procedure X509_get_subject_name()
  123.   	}
  124.   
  125. > X509_NAME *X509_get_subject_name(X509 *a)
  126.   	{
  127.   	return(a->cert_info->subject);

crypto/x509/x509_cmp.c:127:2: 
  125.   X509_NAME *X509_get_subject_name(X509 *a)
  126.   	{
  127. > 	return(a->cert_info->subject);
  128.   	}
  129.   
