crypto/x509/x509_lu.c:582: error: NULL_DEREFERENCE
  pointer `obj` last assigned on line 581 could be null and is dereferenced at line 582, column 7.
Showing all 47 steps of the trace


crypto/x509/x509_lu.c:550:1: start of procedure X509_STORE_get1_crls()
548.   	}
549.   
550. > STACK_OF(X509_CRL)* X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm)
551.   	{
552.   	int i, idx, cnt;

crypto/x509/x509_lu.c:556:2: 
554.   	X509_CRL *x;
555.   	X509_OBJECT *obj, xobj;
556. > 	sk = sk_X509_CRL_new_null();
557.   	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
558.   	/* Check cache first */

crypto/stack/stack.c:115:1: start of procedure sk_new_null()
  113.   	}
  114.   
  115. > _STACK *sk_new_null(void)
  116.   	{
  117.   	return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:117:2: Skipping sk_new(): empty list of specs
  115.   _STACK *sk_new_null(void)
  116.   	{
  117.   	return sk_new((int (*)(const void *, const void *))0);
          ^
  118.   	}
  119.   

crypto/stack/stack.c:118:2: return from a call to sk_new_null
  116.   	{
  117.   	return sk_new((int (*)(const void *, const void *))0);
  118.   	}
          ^
  119.   
  120.   _STACK *sk_new(int (*c)(const void *, const void *))

crypto/x509/x509_lu.c:557:2: 
555.   	X509_OBJECT *obj, xobj;
556.   	sk = sk_X509_CRL_new_null();
557. > 	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
558.   	/* Check cache first */
559.   	idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);

crypto/lock.c:426:1: start of procedure CRYPTO_lock()
  424.   	}
  425.   
  426. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  427.   	{
  428.   #ifdef LOCK_DEBUG

crypto/lock.c:453:6: Taking false branch
  451.   		}
  452.   #endif
  453.   	if (type < 0)
              ^
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:468:7: Taking true branch
  466.   		}
  467.   	else
  468.   		if (locking_callback != NULL)
               ^
  469.   			locking_callback(mode,type,file,line);
  470.   	}

crypto/lock.c:469:4: Skipping __function_pointer__(): unresolved function pointer
  467.   	else
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
            ^
  470.   	}
  471.   

crypto/lock.c:453:2: 
  451.   		}
  452.   #endif
  453. > 	if (type < 0)
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:470:2: return from a call to CRYPTO_lock
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
  470.   	}
          ^
  471.   
  472.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:559:2: Skipping x509_object_idx_cnt(): empty list of specs
557.   	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
558.   	/* Check cache first */
559.   	idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);
        ^
560.   
561.   	/* Always do lookup to possibly add new CRLs to cache

crypto/x509/x509_lu.c:563:2: 
561.   	/* Always do lookup to possibly add new CRLs to cache
562.   	 */
563. > 	CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
564.   	if (!X509_STORE_get_by_subject(ctx, X509_LU_CRL, nm, &xobj))
565.   		{

crypto/lock.c:426:1: start of procedure CRYPTO_lock()
  424.   	}
  425.   
  426. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  427.   	{
  428.   #ifdef LOCK_DEBUG

crypto/lock.c:453:6: Taking false branch
  451.   		}
  452.   #endif
  453.   	if (type < 0)
              ^
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:468:7: Taking true branch
  466.   		}
  467.   	else
  468.   		if (locking_callback != NULL)
               ^
  469.   			locking_callback(mode,type,file,line);
  470.   	}

crypto/lock.c:469:4: Skipping __function_pointer__(): unresolved function pointer
  467.   	else
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
            ^
  470.   	}
  471.   

crypto/lock.c:453:2: 
  451.   		}
  452.   #endif
  453. > 	if (type < 0)
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:470:2: return from a call to CRYPTO_lock
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
  470.   	}
          ^
  471.   
  472.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:564:7: Taking false branch
562.   	 */
563.   	CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
564.   	if (!X509_STORE_get_by_subject(ctx, X509_LU_CRL, nm, &xobj))
             ^
565.   		{
566.   		sk_X509_CRL_free(sk);

crypto/x509/x509_lu.c:569:2: 
567.   		return NULL;
568.   		}
569. > 	X509_OBJECT_free_contents(&xobj);
570.   	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
571.   	idx = x509_object_idx_cnt(ctx->ctx->objs,X509_LU_CRL, nm, &cnt);

crypto/x509/x509_lu.c:426:1: start of procedure X509_OBJECT_free_contents()
  424.   	}
  425.   
  426. > void X509_OBJECT_free_contents(X509_OBJECT *a)
  427.   	{
  428.   	switch (a->type)

crypto/x509/x509_lu.c:428:2: 
  426.   void X509_OBJECT_free_contents(X509_OBJECT *a)
  427.   	{
  428. > 	switch (a->type)
  429.   		{
  430.   	case X509_LU_X509:

crypto/x509/x509_lu.c:430:2: Switch condition is false. Skipping switch case
  428.   	switch (a->type)
  429.   		{
  430.   	case X509_LU_X509:
          ^
  431.   		X509_free(a->data.x509);
  432.   		break;

crypto/x509/x509_lu.c:433:2: Switch condition is false. Skipping switch case
  431.   		X509_free(a->data.x509);
  432.   		break;
  433.   	case X509_LU_CRL:
          ^
  434.   		X509_CRL_free(a->data.crl);
  435.   		break;

crypto/x509/x509_lu.c:437:2: return from a call to X509_OBJECT_free_contents
  435.   		break;
  436.   		}
  437.   	}
          ^
  438.   
  439.   static int x509_object_idx_cnt(STACK_OF(X509_OBJECT) *h, int type,

crypto/x509/x509_lu.c:570:2: 
568.   		}
569.   	X509_OBJECT_free_contents(&xobj);
570. > 	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
571.   	idx = x509_object_idx_cnt(ctx->ctx->objs,X509_LU_CRL, nm, &cnt);
572.   	if (idx < 0)

crypto/lock.c:426:1: start of procedure CRYPTO_lock()
  424.   	}
  425.   
  426. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  427.   	{
  428.   #ifdef LOCK_DEBUG

crypto/lock.c:453:6: Taking false branch
  451.   		}
  452.   #endif
  453.   	if (type < 0)
              ^
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:468:7: Taking true branch
  466.   		}
  467.   	else
  468.   		if (locking_callback != NULL)
               ^
  469.   			locking_callback(mode,type,file,line);
  470.   	}

crypto/lock.c:469:4: Skipping __function_pointer__(): unresolved function pointer
  467.   	else
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
            ^
  470.   	}
  471.   

crypto/lock.c:453:2: 
  451.   		}
  452.   #endif
  453. > 	if (type < 0)
  454.   		{
  455.   		if (dynlock_lock_callback != NULL)

crypto/lock.c:470:2: return from a call to CRYPTO_lock
  468.   		if (locking_callback != NULL)
  469.   			locking_callback(mode,type,file,line);
  470.   	}
          ^
  471.   
  472.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:571:2: Skipping x509_object_idx_cnt(): empty list of specs
569.   	X509_OBJECT_free_contents(&xobj);
570.   	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
571.   	idx = x509_object_idx_cnt(ctx->ctx->objs,X509_LU_CRL, nm, &cnt);
        ^
572.   	if (idx < 0)
573.   		{

crypto/x509/x509_lu.c:572:6: Taking false branch
570.   	CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
571.   	idx = x509_object_idx_cnt(ctx->ctx->objs,X509_LU_CRL, nm, &cnt);
572.   	if (idx < 0)
            ^
573.   		{
574.   		CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);

crypto/x509/x509_lu.c:579:7: 
577.   		}
578.   
579. > 	for (i = 0; i < cnt; i++, idx++)
580.   		{
581.   		obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);

crypto/x509/x509_lu.c:579:14: Loop condition is true. Entering loop body
577.   		}
578.   
579.   	for (i = 0; i < cnt; i++, idx++)
                    ^
580.   		{
581.   		obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);

crypto/x509/x509_lu.c:581:9: Condition is true
579.   	for (i = 0; i < cnt; i++, idx++)
580.   		{
581.   		obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
               ^
582.   		x = obj->data.crl;
583.   		CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);

crypto/x509/x509_lu.c:581:3: 
579.   	for (i = 0; i < cnt; i++, idx++)
580.   		{
581. > 		obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
582.   		x = obj->data.crl;
583.   		CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);

crypto/stack/stack.c:300:1: start of procedure sk_value()
  298.   }
  299.   
  300. > void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;

crypto/stack/stack.c:302:6: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
              ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:13: Taking false branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                     ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:24: Taking true branch
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
                                ^
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:302:39: 
  300.   void *sk_value(const _STACK *st, int i)
  301.   {
  302. > 	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304.   }

crypto/stack/stack.c:304:1: return from a call to sk_value
  302.   	if(!st || (i < 0) || (i >= st->num)) return NULL;
  303.   	return st->data[i];
  304. > }
  305.   
  306.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_lu.c:582:3: 
580.   		{
581.   		obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
582. > 		x = obj->data.crl;
583.   		CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);
584.   		if (!sk_X509_CRL_push(sk, x))
