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


crypto/x509/x509_lu.c:530:1: start of procedure X509_STORE_get1_crls()
528.   }
529.   
530. > STACK_OF(X509_CRL) *X509_STORE_get1_crls(X509_STORE_CTX *ctx, X509_NAME *nm)
531.   {
532.       int i, idx, cnt;

crypto/x509/x509_lu.c:536:5: 
534.       X509_CRL *x;
535.       X509_OBJECT *obj, xobj;
536. >     sk = sk_X509_CRL_new_null();
537.       CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
538.       /* Check cache first */

crypto/stack/stack.c:152:1: start of procedure sk_new_null()
  150.   }
  151.   
  152. > _STACK *sk_new_null(void)
  153.   {
  154.       return sk_new((int (*)(const void *, const void *))0);

crypto/stack/stack.c:154:5: Skipping sk_new(): empty list of specs
  152.   _STACK *sk_new_null(void)
  153.   {
  154.       return sk_new((int (*)(const void *, const void *))0);
             ^
  155.   }
  156.   

crypto/stack/stack.c:155:1: return from a call to sk_new_null
  153.   {
  154.       return sk_new((int (*)(const void *, const void *))0);
  155. > }
  156.   
  157.   _STACK *sk_new(int (*c) (const void *, const void *))

crypto/x509/x509_lu.c:537:5: 
535.       X509_OBJECT *obj, xobj;
536.       sk = sk_X509_CRL_new_null();
537. >     CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
538.       /* Check cache first */
539.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);

crypto/lock.c:417:1: start of procedure CRYPTO_lock()
  415.   }
  416.   
  417. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  418.   {
  419.   #ifdef LOCK_DEBUG

crypto/lock.c:444:9: Taking false branch
  442.       }
  443.   #endif
  444.       if (type < 0) {
                 ^
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:455:16: Taking true branch
  453.               CRYPTO_destroy_dynlockid(type);
  454.           }
  455.       } else if (locking_callback != NULL)
                        ^
  456.           locking_callback(mode, type, file, line);
  457.   }

crypto/lock.c:456:9: Skipping __function_pointer__(): unresolved function pointer
  454.           }
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
                 ^
  457.   }
  458.   

crypto/lock.c:444:5: 
  442.       }
  443.   #endif
  444. >     if (type < 0) {
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:457:1: return from a call to CRYPTO_lock
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
  457. > }
  458.   
  459.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:539:5: Skipping x509_object_idx_cnt(): empty list of specs
537.       CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
538.       /* Check cache first */
539.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);
           ^
540.   
541.       /*

crypto/x509/x509_lu.c:544:5: 
542.        * Always do lookup to possibly add new CRLs to cache
543.        */
544. >     CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
545.       if (!X509_STORE_get_by_subject(ctx, X509_LU_CRL, nm, &xobj)) {
546.           sk_X509_CRL_free(sk);

crypto/lock.c:417:1: start of procedure CRYPTO_lock()
  415.   }
  416.   
  417. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  418.   {
  419.   #ifdef LOCK_DEBUG

crypto/lock.c:444:9: Taking false branch
  442.       }
  443.   #endif
  444.       if (type < 0) {
                 ^
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:455:16: Taking true branch
  453.               CRYPTO_destroy_dynlockid(type);
  454.           }
  455.       } else if (locking_callback != NULL)
                        ^
  456.           locking_callback(mode, type, file, line);
  457.   }

crypto/lock.c:456:9: Skipping __function_pointer__(): unresolved function pointer
  454.           }
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
                 ^
  457.   }
  458.   

crypto/lock.c:444:5: 
  442.       }
  443.   #endif
  444. >     if (type < 0) {
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:457:1: return from a call to CRYPTO_lock
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
  457. > }
  458.   
  459.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:545:10: Taking false branch
543.        */
544.       CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
545.       if (!X509_STORE_get_by_subject(ctx, X509_LU_CRL, nm, &xobj)) {
                ^
546.           sk_X509_CRL_free(sk);
547.           return NULL;

crypto/x509/x509_lu.c:549:5: 
547.           return NULL;
548.       }
549. >     X509_OBJECT_free_contents(&xobj);
550.       CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
551.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);

crypto/x509/x509_lu.c:414:1: start of procedure X509_OBJECT_free_contents()
  412.   }
  413.   
  414. > void X509_OBJECT_free_contents(X509_OBJECT *a)
  415.   {
  416.       switch (a->type) {

crypto/x509/x509_lu.c:416:5: 
  414.   void X509_OBJECT_free_contents(X509_OBJECT *a)
  415.   {
  416. >     switch (a->type) {
  417.       case X509_LU_X509:
  418.           X509_free(a->data.x509);

crypto/x509/x509_lu.c:417:5: Switch condition is false. Skipping switch case
  415.   {
  416.       switch (a->type) {
  417.       case X509_LU_X509:
             ^
  418.           X509_free(a->data.x509);
  419.           break;

crypto/x509/x509_lu.c:420:5: Switch condition is false. Skipping switch case
  418.           X509_free(a->data.x509);
  419.           break;
  420.       case X509_LU_CRL:
             ^
  421.           X509_CRL_free(a->data.crl);
  422.           break;

crypto/x509/x509_lu.c:424:1: return from a call to X509_OBJECT_free_contents
  422.           break;
  423.       }
  424. > }
  425.   
  426.   static int x509_object_idx_cnt(STACK_OF(X509_OBJECT) *h, int type,

crypto/x509/x509_lu.c:550:5: 
548.       }
549.       X509_OBJECT_free_contents(&xobj);
550. >     CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
551.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);
552.       if (idx < 0) {

crypto/lock.c:417:1: start of procedure CRYPTO_lock()
  415.   }
  416.   
  417. > void CRYPTO_lock(int mode, int type, const char *file, int line)
  418.   {
  419.   #ifdef LOCK_DEBUG

crypto/lock.c:444:9: Taking false branch
  442.       }
  443.   #endif
  444.       if (type < 0) {
                 ^
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:455:16: Taking true branch
  453.               CRYPTO_destroy_dynlockid(type);
  454.           }
  455.       } else if (locking_callback != NULL)
                        ^
  456.           locking_callback(mode, type, file, line);
  457.   }

crypto/lock.c:456:9: Skipping __function_pointer__(): unresolved function pointer
  454.           }
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
                 ^
  457.   }
  458.   

crypto/lock.c:444:5: 
  442.       }
  443.   #endif
  444. >     if (type < 0) {
  445.           if (dynlock_lock_callback != NULL) {
  446.               struct CRYPTO_dynlock_value *pointer

crypto/lock.c:457:1: return from a call to CRYPTO_lock
  455.       } else if (locking_callback != NULL)
  456.           locking_callback(mode, type, file, line);
  457. > }
  458.   
  459.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/x509/x509_lu.c:551:5: Skipping x509_object_idx_cnt(): empty list of specs
549.       X509_OBJECT_free_contents(&xobj);
550.       CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
551.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);
           ^
552.       if (idx < 0) {
553.           CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);

crypto/x509/x509_lu.c:552:9: Taking false branch
550.       CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
551.       idx = x509_object_idx_cnt(ctx->ctx->objs, X509_LU_CRL, nm, &cnt);
552.       if (idx < 0) {
               ^
553.           CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
554.           sk_X509_CRL_free(sk);

crypto/x509/x509_lu.c:558:10: 
556.       }
557.   
558. >     for (i = 0; i < cnt; i++, idx++) {
559.           obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
560.           x = obj->data.crl;

crypto/x509/x509_lu.c:558:17: Loop condition is true. Entering loop body
556.       }
557.   
558.       for (i = 0; i < cnt; i++, idx++) {
                       ^
559.           obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
560.           x = obj->data.crl;

crypto/x509/x509_lu.c:559:15: Condition is true
557.   
558.       for (i = 0; i < cnt; i++, idx++) {
559.           obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
                     ^
560.           x = obj->data.crl;
561.           CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);

crypto/x509/x509_lu.c:559:9: 
557.   
558.       for (i = 0; i < cnt; i++, idx++) {
559. >         obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
560.           x = obj->data.crl;
561.           CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);

crypto/stack/stack.c:347:1: start of procedure sk_value()
  345.   }
  346.   
  347. > void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))

crypto/stack/stack.c:349:10: Taking false branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                  ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:349:17: Taking false branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                         ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:349:28: Taking true branch
  347.   void *sk_value(const _STACK *st, int i)
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
                                    ^
  350.           return NULL;
  351.       return st->data[i];

crypto/stack/stack.c:350:9: 
  348.   {
  349.       if (!st || (i < 0) || (i >= st->num))
  350. >         return NULL;
  351.       return st->data[i];
  352.   }

crypto/stack/stack.c:352:1: return from a call to sk_value
  350.           return NULL;
  351.       return st->data[i];
  352. > }
  353.   
  354.   void *sk_set(_STACK *st, int i, void *value)

crypto/x509/x509_lu.c:560:9: 
558.       for (i = 0; i < cnt; i++, idx++) {
559.           obj = sk_X509_OBJECT_value(ctx->ctx->objs, idx);
560. >         x = obj->data.crl;
561.           CRYPTO_add(&x->references, 1, CRYPTO_LOCK_X509_CRL);
562.           if (!sk_X509_CRL_push(sk, x)) {
