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


crypto/x509/x509_vfy.c:427:1: start of procedure internal_verify()
425.   }
426.   
427. > static int internal_verify(X509_STORE_CTX *ctx)
428.   	{
429.   	int i,ok=0,n;

crypto/x509/x509_vfy.c:429:2: 
427.   static int internal_verify(X509_STORE_CTX *ctx)
428.   	{
429. > 	int i,ok=0,n;
430.   	X509 *xs,*xi;
431.   	EVP_PKEY *pkey=NULL;

crypto/x509/x509_vfy.c:431:2: 
429.   	int i,ok=0,n;
430.   	X509 *xs,*xi;
431. > 	EVP_PKEY *pkey=NULL;
432.   	int (*cb)();
433.   

crypto/x509/x509_vfy.c:434:2: 
432.   	int (*cb)();
433.   
434. > 	cb=ctx->verify_cb;
435.   	if (cb == NULL) cb=null_callback;
436.   

crypto/x509/x509_vfy.c:435:6: Taking false branch
433.   
434.   	cb=ctx->verify_cb;
435.   	if (cb == NULL) cb=null_callback;
            ^
436.   
437.   	n=sk_X509_num(ctx->chain);

crypto/x509/x509_vfy.c:437:2: 
435.   	if (cb == NULL) cb=null_callback;
436.   
437. > 	n=sk_X509_num(ctx->chain);
438.   	ctx->error_depth=n-1;
439.   	n--;

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

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

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

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

crypto/x509/x509_vfy.c:438:2: 
436.   
437.   	n=sk_X509_num(ctx->chain);
438. > 	ctx->error_depth=n-1;
439.   	n--;
440.   	xi=sk_X509_value(ctx->chain,n);

crypto/x509/x509_vfy.c:439:2: 
437.   	n=sk_X509_num(ctx->chain);
438.   	ctx->error_depth=n-1;
439. > 	n--;
440.   	xi=sk_X509_value(ctx->chain,n);
441.   	if (X509_NAME_cmp(X509_get_subject_name(xi),

crypto/x509/x509_vfy.c:440:2: 
438.   	ctx->error_depth=n-1;
439.   	n--;
440. > 	xi=sk_X509_value(ctx->chain,n);
441.   	if (X509_NAME_cmp(X509_get_subject_name(xi),
442.   		X509_get_issuer_name(xi)) == 0)

crypto/stack/stack.c:305:1: start of procedure sk_value()
  303.   }
  304.   
  305. > char *sk_value(const STACK *st, int i)
  306.   {
  307.   	if(st == NULL) return NULL;

crypto/stack/stack.c:307:5: Taking true branch
  305.   char *sk_value(const STACK *st, int i)
  306.   {
  307.   	if(st == NULL) return NULL;
             ^
  308.   	return st->data[i];
  309.   }

crypto/stack/stack.c:307:17: 
  305.   char *sk_value(const STACK *st, int i)
  306.   {
  307. > 	if(st == NULL) return NULL;
  308.   	return st->data[i];
  309.   }

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

crypto/x509/x509_vfy.c:441:6: 
439.   	n--;
440.   	xi=sk_X509_value(ctx->chain,n);
441. > 	if (X509_NAME_cmp(X509_get_subject_name(xi),
442.   		X509_get_issuer_name(xi)) == 0)
443.   		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.   
