crypto/dsa/dsa_lib.c:123: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 120 could be null and is dereferenced at line 123, column 6.
Showing all 44 steps of the trace


crypto/dsa/dsa_lib.c:115:1: start of procedure DSA_set_method()
113.   }
114.   #else
115. > int DSA_set_method(DSA *dsa, ENGINE *engine)
116.   	{
117.   	ENGINE *mtmp;

crypto/dsa/dsa_lib.c:119:2: 
117.   	ENGINE *mtmp;
118.   	const DSA_METHOD *meth;
119. > 	mtmp = dsa->engine;
120.   	meth = ENGINE_get_DSA(mtmp);
121.   	if (!ENGINE_init(engine))

crypto/dsa/dsa_lib.c:120:2: 
118.   	const DSA_METHOD *meth;
119.   	mtmp = dsa->engine;
120. > 	meth = ENGINE_get_DSA(mtmp);
121.   	if (!ENGINE_init(engine))
122.   		return 0;

crypto/engine/engine_list.c:574:1: start of procedure ENGINE_get_DSA()
  572.   	}
  573.   
  574. > const DSA_METHOD *ENGINE_get_DSA(ENGINE *e)
  575.   	{
  576.   	if(e == NULL)

crypto/engine/engine_list.c:576:5: Taking true branch
  574.   const DSA_METHOD *ENGINE_get_DSA(ENGINE *e)
  575.   	{
  576.   	if(e == NULL)
             ^
  577.   		{
  578.   		ENGINEerr(ENGINE_F_ENGINE_GET_DSA,

crypto/engine/engine_list.c:578:3: 
  576.   	if(e == NULL)
  577.   		{
  578. > 		ENGINEerr(ENGINE_F_ENGINE_GET_DSA,
  579.   			ERR_R_PASSED_NULL_PARAMETER);
  580.   		return NULL;

crypto/err/err.c:355:1: start of procedure ERR_put_error()
    353.   /********************************************************/
    354.   
    355. > void ERR_put_error(int lib, int func, int reason, const char *file,
    356.   	     int line)
    357.   	{

crypto/err/err.c:379:2: Skipping ERR_get_state(): empty list of specs
    377.   	}
    378.   #endif
    379.   	es=ERR_get_state();
            ^
    380.   
    381.   	es->top=(es->top+1)%ERR_NUM_ERRORS;

crypto/err/err.c:381:2: 
    379.   	es=ERR_get_state();
    380.   
    381. > 	es->top=(es->top+1)%ERR_NUM_ERRORS;
    382.   	if (es->top == es->bottom)
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;

crypto/err/err.c:382:6: Taking false branch
    380.   
    381.   	es->top=(es->top+1)%ERR_NUM_ERRORS;
    382.   	if (es->top == es->bottom)
                ^
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);

crypto/err/err.c:384:2: 
    382.   	if (es->top == es->bottom)
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384. > 	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;

crypto/err/err.c:385:2: 
    383.   		es->bottom=(es->bottom+1)%ERR_NUM_ERRORS;
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385. > 	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);

crypto/err/err.c:386:2: 
    384.   	es->err_buffer[es->top]=ERR_PACK(lib,func,reason);
    385.   	es->err_file[es->top]=file;
    386. > 	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
    388.   	}

crypto/err/err.c:387:2: Taking true branch
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
            ^
    388.   	}
    389.   

crypto/err/err.c:387:2: Taking false branch
    385.   	es->err_file[es->top]=file;
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
            ^
    388.   	}
    389.   

crypto/err/err.c:388:2: return from a call to ERR_put_error
    386.   	es->err_line[es->top]=line;
    387.   	err_clear_data(es,es->top);
    388.   	}
            ^
    389.   
    390.   void ERR_clear_error(void)

crypto/engine/engine_list.c:580:3: 
  578.   		ENGINEerr(ENGINE_F_ENGINE_GET_DSA,
  579.   			ERR_R_PASSED_NULL_PARAMETER);
  580. > 		return NULL;
  581.   		}
  582.   	return e->dsa_meth;

crypto/engine/engine_list.c:583:2: return from a call to ENGINE_get_DSA
  581.   		}
  582.   	return e->dsa_meth;
  583.   	}
          ^
  584.   
  585.   const DH_METHOD *ENGINE_get_DH(ENGINE *e)

crypto/dsa/dsa_lib.c:121:7: 
119.   	mtmp = dsa->engine;
120.   	meth = ENGINE_get_DSA(mtmp);
121. > 	if (!ENGINE_init(engine))
122.   		return 0;
123.   	if (meth->finish) meth->finish(dsa);

crypto/engine/engine_lib.c:143:1: start of procedure ENGINE_init()
  141.   /* Initialise a engine type for use (or up its functional reference count
  142.    * if it's already in use). */
  143. > int ENGINE_init(ENGINE *e)
  144.   	{
  145.   	int to_return = 1;

crypto/engine/engine_lib.c:145:2: 
  143.   int ENGINE_init(ENGINE *e)
  144.   	{
  145. > 	int to_return = 1;
  146.   
  147.   	if(e == NULL)

crypto/engine/engine_lib.c:147:5: Taking false branch
  145.   	int to_return = 1;
  146.   
  147.   	if(e == NULL)
             ^
  148.   		{
  149.   		ENGINEerr(ENGINE_F_ENGINE_INIT,ERR_R_PASSED_NULL_PARAMETER);

crypto/engine/engine_lib.c:152:2: 
  150.   		return 0;
  151.   		}
  152. > 	CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
  153.   	if((e->funct_ref == 0) && e->init)
  154.   		/* This is the first functional reference and the engine

crypto/cryptlib.c:372:1: start of procedure CRYPTO_lock()
    370.   	}
    371.   
    372. > void CRYPTO_lock(int mode, int type, const char *file, int line)
    373.   	{
    374.   #ifdef LOCK_DEBUG

crypto/cryptlib.c:397:6: Taking false branch
    395.   		}
    396.   #endif
    397.   	if (type < 0)
                ^
    398.   		{
    399.   		int i = -type - 1;

crypto/cryptlib.c:411:7: Taking true branch
    409.   		}
    410.   	else
    411.   		if (locking_callback != NULL)
                 ^
    412.   			locking_callback(mode,type,file,line);
    413.   	}

crypto/cryptlib.c:412:4: Skipping __function_pointer__(): unresolved function pointer
    410.   	else
    411.   		if (locking_callback != NULL)
    412.   			locking_callback(mode,type,file,line);
              ^
    413.   	}
    414.   

crypto/cryptlib.c:397:2: 
    395.   		}
    396.   #endif
    397. > 	if (type < 0)
    398.   		{
    399.   		int i = -type - 1;

crypto/cryptlib.c:413:2: return from a call to CRYPTO_lock
    411.   		if (locking_callback != NULL)
    412.   			locking_callback(mode,type,file,line);
    413.   	}
            ^
    414.   
    415.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/engine/engine_lib.c:153:6: Taking false branch
  151.   		}
  152.   	CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
  153.   	if((e->funct_ref == 0) && e->init)
              ^
  154.   		/* This is the first functional reference and the engine
  155.   		 * requires initialisation so we do it now. */

crypto/engine/engine_lib.c:157:5: Taking true branch
  155.   		 * requires initialisation so we do it now. */
  156.   		to_return = e->init();
  157.   	if(to_return)
             ^
  158.   		{
  159.   		/* OK, we return a functional reference which is also a

crypto/engine/engine_lib.c:161:3: 
  159.   		/* OK, we return a functional reference which is also a
  160.   		 * structural reference. */
  161. > 		e->struct_ref++;
  162.   		e->funct_ref++;
  163.   		}

crypto/engine/engine_lib.c:162:3: 
  160.   		 * structural reference. */
  161.   		e->struct_ref++;
  162. > 		e->funct_ref++;
  163.   		}
  164.   	CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);

crypto/engine/engine_lib.c:164:2: 
  162.   		e->funct_ref++;
  163.   		}
  164. > 	CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
  165.   	return to_return;
  166.   	}

crypto/cryptlib.c:372:1: start of procedure CRYPTO_lock()
    370.   	}
    371.   
    372. > void CRYPTO_lock(int mode, int type, const char *file, int line)
    373.   	{
    374.   #ifdef LOCK_DEBUG

crypto/cryptlib.c:397:6: Taking false branch
    395.   		}
    396.   #endif
    397.   	if (type < 0)
                ^
    398.   		{
    399.   		int i = -type - 1;

crypto/cryptlib.c:411:7: Taking true branch
    409.   		}
    410.   	else
    411.   		if (locking_callback != NULL)
                 ^
    412.   			locking_callback(mode,type,file,line);
    413.   	}

crypto/cryptlib.c:412:4: Skipping __function_pointer__(): unresolved function pointer
    410.   	else
    411.   		if (locking_callback != NULL)
    412.   			locking_callback(mode,type,file,line);
              ^
    413.   	}
    414.   

crypto/cryptlib.c:397:2: 
    395.   		}
    396.   #endif
    397. > 	if (type < 0)
    398.   		{
    399.   		int i = -type - 1;

crypto/cryptlib.c:413:2: return from a call to CRYPTO_lock
    411.   		if (locking_callback != NULL)
    412.   			locking_callback(mode,type,file,line);
    413.   	}
            ^
    414.   
    415.   int CRYPTO_add_lock(int *pointer, int amount, int type, const char *file,

crypto/engine/engine_lib.c:165:2: 
  163.   		}
  164.   	CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
  165. > 	return to_return;
  166.   	}
  167.   

crypto/engine/engine_lib.c:166:2: return from a call to ENGINE_init
  164.   	CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
  165.   	return to_return;
  166.   	}
          ^
  167.   
  168.   /* Free a functional reference to a engine type */

crypto/dsa/dsa_lib.c:121:7: Taking false branch
119.   	mtmp = dsa->engine;
120.   	meth = ENGINE_get_DSA(mtmp);
121.   	if (!ENGINE_init(engine))
             ^
122.   		return 0;
123.   	if (meth->finish) meth->finish(dsa);

crypto/dsa/dsa_lib.c:123:6: Taking false branch
121.   	if (!ENGINE_init(engine))
122.   		return 0;
123.   	if (meth->finish) meth->finish(dsa);
            ^
124.   	dsa->engine = engine;
125.   	meth = ENGINE_get_DSA(engine);
