apps/errstr.c:100: error: NULL_DEREFERENCE
  pointer returned by `ERR_get_string_table()` could be null and is dereferenced by call to `lh_node_stats_bio()` at line 100, column 13.
Showing all 37 steps of the trace


apps/errstr.c:81:1: start of procedure errstr_main()
79.   };
80.   
81. > int errstr_main(int argc, char **argv)
82.   {
83.       OPTION_CHOICE o;

apps/errstr.c:85:5: 
83.       OPTION_CHOICE o;
84.       char buf[256], *prog;
85. >     int ret = 1;
86.       unsigned long l;
87.   

apps/errstr.c:88:5: Skipping opt_init(): empty list of specs
86.       unsigned long l;
87.   
88.       prog = opt_init(argc, argv, errstr_options);
          ^
89.       while ((o = opt_next()) != OPT_EOF) {
90.           switch (o) {

apps/errstr.c:89:12: Loop condition is true. Entering loop body
87.   
88.       prog = opt_init(argc, argv, errstr_options);
89.       while ((o = opt_next()) != OPT_EOF) {
                 ^
90.           switch (o) {
91.           case OPT_EOF:

apps/errstr.c:90:9: 
88.       prog = opt_init(argc, argv, errstr_options);
89.       while ((o = opt_next()) != OPT_EOF) {
90. >         switch (o) {
91.           case OPT_EOF:
92.           case OPT_ERR:

apps/errstr.c:91:9: Switch condition is false. Skipping switch case
89.       while ((o = opt_next()) != OPT_EOF) {
90.           switch (o) {
91.           case OPT_EOF:
              ^
92.           case OPT_ERR:
93.               BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);

apps/errstr.c:92:9: Switch condition is false. Skipping switch case
90.           switch (o) {
91.           case OPT_EOF:
92.           case OPT_ERR:
              ^
93.               BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
94.               goto end;

apps/errstr.c:95:9: Switch condition is false. Skipping switch case
93.               BIO_printf(bio_err, "%s: Use -help for summary.\n", prog);
94.               goto end;
95.           case OPT_HELP:
              ^
96.               opt_help(errstr_options);
97.               ret = 0;

apps/errstr.c:99:9: Switch condition is true. Entering switch case
97.               ret = 0;
98.               goto end;
99.           case OPT_STATS:
               ^
100.               lh_ERR_STRING_DATA_node_stats_bio(ERR_get_string_table(),
101.                                                 bio_out);

apps/errstr.c:100:13: Condition is true
98.               goto end;
99.           case OPT_STATS:
100.               lh_ERR_STRING_DATA_node_stats_bio(ERR_get_string_table(),
                   ^
101.                                                 bio_out);
102.               lh_ERR_STRING_DATA_stats_bio(ERR_get_string_table(), bio_out);

crypto/err/err.c:793:1: start of procedure ERR_get_string_table()
  791.   }
  792.   
  793. > LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void)
  794.   {
  795.       return get_hash(0, 1);

crypto/err/err.c:795:5: 
  793.   LHASH_OF(ERR_STRING_DATA) *ERR_get_string_table(void)
  794.   {
  795. >     return get_hash(0, 1);
  796.   }
  797.   

crypto/err/err.c:272:1: start of procedure get_hash()
    270.   static IMPLEMENT_LHASH_COMP_FN(err_string_data, ERR_STRING_DATA)
    271.   
    272. > static LHASH_OF(ERR_STRING_DATA) *get_hash(int create, int lockit)
    273.   {
    274.       LHASH_OF(ERR_STRING_DATA) *ret = NULL;

crypto/err/err.c:274:5: 
    272.   static LHASH_OF(ERR_STRING_DATA) *get_hash(int create, int lockit)
    273.   {
    274. >     LHASH_OF(ERR_STRING_DATA) *ret = NULL;
    275.   
    276.       if (lockit)

crypto/err/err.c:276:9: Taking true branch
    274.       LHASH_OF(ERR_STRING_DATA) *ret = NULL;
    275.   
    276.       if (lockit)
                   ^
    277.           CRYPTO_w_lock(CRYPTO_LOCK_ERR);
    278.       if (!int_error_hash && create) {

crypto/err/err.c:277:9: 
    275.   
    276.       if (lockit)
    277. >         CRYPTO_w_lock(CRYPTO_LOCK_ERR);
    278.       if (!int_error_hash && create) {
    279.           int_error_hash = lh_ERR_STRING_DATA_new();

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

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

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

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

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

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

crypto/err/err.c:278:10: Taking true branch
    276.       if (lockit)
    277.           CRYPTO_w_lock(CRYPTO_LOCK_ERR);
    278.       if (!int_error_hash && create) {
                    ^
    279.           int_error_hash = lh_ERR_STRING_DATA_new();
    280.       }

crypto/err/err.c:278:28: Taking false branch
    276.       if (lockit)
    277.           CRYPTO_w_lock(CRYPTO_LOCK_ERR);
    278.       if (!int_error_hash && create) {
                                      ^
    279.           int_error_hash = lh_ERR_STRING_DATA_new();
    280.       }

crypto/err/err.c:281:9: Taking false branch
    279.           int_error_hash = lh_ERR_STRING_DATA_new();
    280.       }
    281.       if (int_error_hash != NULL)
                   ^
    282.           ret = int_error_hash;
    283.       if (lockit)

crypto/err/err.c:283:9: Taking true branch
    281.       if (int_error_hash != NULL)
    282.           ret = int_error_hash;
    283.       if (lockit)
                   ^
    284.           CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
    285.   

crypto/err/err.c:284:9: 
    282.           ret = int_error_hash;
    283.       if (lockit)
    284. >         CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
    285.   
    286.       return ret;

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

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

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

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

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

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

crypto/err/err.c:286:5: 
    284.           CRYPTO_w_unlock(CRYPTO_LOCK_ERR);
    285.   
    286. >     return ret;
    287.   }
    288.   

crypto/err/err.c:287:1: return from a call to get_hash
    285.   
    286.       return ret;
    287. > }
    288.   
    289.   static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d)

crypto/err/err.c:796:1: return from a call to ERR_get_string_table
  794.   {
  795.       return get_hash(0, 1);
  796. > }
  797.   
  798.   LHASH_OF(ERR_STATE) *ERR_get_err_state_table(void)

apps/errstr.c:100:13: 
98.               goto end;
99.           case OPT_STATS:
100. >             lh_ERR_STRING_DATA_node_stats_bio(ERR_get_string_table(),
101.                                                 bio_out);
102.               lh_ERR_STRING_DATA_stats_bio(ERR_get_string_table(), bio_out);
