crypto/rand/rand_lib.c:839: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 837 could be null and is dereferenced at line 839, column 9.
Showing all 6 steps of the trace


crypto/rand/rand_lib.c:835:1: start of procedure RAND_seed()
833.   #endif
834.   
835. > void RAND_seed(const void *buf, int num)
836.   {
837.       const RAND_METHOD *meth = RAND_get_rand_method();

crypto/rand/rand_lib.c:837:5: 
835.   void RAND_seed(const void *buf, int num)
836.   {
837. >     const RAND_METHOD *meth = RAND_get_rand_method();
838.   
839.       if (meth->seed != NULL)

crypto/rand/rand_lib.c:775:1: start of procedure RAND_get_rand_method()
  773.   #endif
  774.   
  775. > const RAND_METHOD *RAND_get_rand_method(void)
  776.   {
  777.   #ifdef FIPS_MODE

crypto/rand/rand_lib.c:778:5: 
  776.   {
  777.   #ifdef FIPS_MODE
  778. >     return NULL;
  779.   #else
  780.       const RAND_METHOD *tmp_meth = NULL;

crypto/rand/rand_lib.c:807:1: return from a call to RAND_get_rand_method
  805.       return tmp_meth;
  806.   #endif
  807. > }
  808.   
  809.   #if !defined(OPENSSL_NO_ENGINE) && !defined(FIPS_MODE)

crypto/rand/rand_lib.c:839:9: 
837.       const RAND_METHOD *meth = RAND_get_rand_method();
838.   
839. >     if (meth->seed != NULL)
840.           meth->seed(buf, num);
841.   }

void RAND_seed(const void *buf, int num)
{
    const RAND_METHOD *meth = RAND_get_rand_method();
    if (meth->seed != NULL)
        meth->seed(buf, num);
}
['void RAND_seed(const void *buf, int num)\n{\n    const RAND_METHOD *meth = RAND_get_rand_method();\n    if (meth->seed != NULL)\n        meth->seed(buf, num);\n}', 'const RAND_METHOD *RAND_get_rand_method(void)\n{\n#ifdef FIPS_MODE\n    return NULL;\n#else\n    const RAND_METHOD *tmp_meth = NULL;\n    if (!RUN_ONCE(&rand_init, do_rand_init))\n        return NULL;\n    CRYPTO_THREAD_write_lock(rand_meth_lock);\n    if (default_RAND_meth == NULL) {\n# ifndef OPENSSL_NO_ENGINE\n        ENGINE *e;\n        if ((e = ENGINE_get_default_RAND()) != NULL\n                && (tmp_meth = ENGINE_get_RAND(e)) != NULL) {\n            funct_ref = e;\n            default_RAND_meth = tmp_meth;\n        } else {\n            ENGINE_finish(e);\n            default_RAND_meth = &rand_meth;\n        }\n# else\n        default_RAND_meth = &rand_meth;\n# endif\n    }\n    tmp_meth = default_RAND_meth;\n    CRYPTO_THREAD_unlock(rand_meth_lock);\n    return tmp_meth;\n#endif\n}']