crypto/rsa/rsa_eay.c:517: error: NULL_DEREFERENCE
  pointer `meth` last assigned on line 460 could be null and is dereferenced at line 517, column 7.
Showing all 32 steps of the trace


crypto/rsa/rsa_eay.c:453:1: start of procedure RSA_eay_mod_exp()
451.   	}
452.   
453. > static int RSA_eay_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa)
454.   	{
455.   	const RSA_METHOD *meth;

crypto/rsa/rsa_eay.c:457:2: 
455.   	const RSA_METHOD *meth;
456.   	BIGNUM r1,m1;
457. > 	int ret=0;
458.   	BN_CTX *ctx;
459.   

crypto/rsa/rsa_eay.c:460:2: 
458.   	BN_CTX *ctx;
459.   
460. > 	meth = ENGINE_get_RSA(rsa->engine);
461.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
462.   	BN_init(&m1);

crypto/engine/engine_list.c:563:1: start of procedure ENGINE_get_RSA()
  561.   	}
  562.   
  563. > const RSA_METHOD *ENGINE_get_RSA(ENGINE *e)
  564.   	{
  565.   	if(e == NULL)

crypto/engine/engine_list.c:565:5: Taking true branch
  563.   const RSA_METHOD *ENGINE_get_RSA(ENGINE *e)
  564.   	{
  565.   	if(e == NULL)
             ^
  566.   		{
  567.   		ENGINEerr(ENGINE_F_ENGINE_GET_RSA,

crypto/engine/engine_list.c:567:3: 
  565.   	if(e == NULL)
  566.   		{
  567. > 		ENGINEerr(ENGINE_F_ENGINE_GET_RSA,
  568.   			ERR_R_PASSED_NULL_PARAMETER);
  569.   		return NULL;

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

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

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

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

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

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

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

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

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

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

crypto/engine/engine_list.c:569:3: 
  567.   		ENGINEerr(ENGINE_F_ENGINE_GET_RSA,
  568.   			ERR_R_PASSED_NULL_PARAMETER);
  569. > 		return NULL;
  570.   		}
  571.   	return e->rsa_meth;

crypto/engine/engine_list.c:572:2: return from a call to ENGINE_get_RSA
  570.   		}
  571.   	return e->rsa_meth;
  572.   	}
          ^
  573.   
  574.   const DSA_METHOD *ENGINE_get_DSA(ENGINE *e)

crypto/rsa/rsa_eay.c:461:6: Taking false branch
459.   
460.   	meth = ENGINE_get_RSA(rsa->engine);
461.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
            ^
462.   	BN_init(&m1);
463.   	BN_init(&r1);

crypto/rsa/rsa_eay.c:462:2: 
460.   	meth = ENGINE_get_RSA(rsa->engine);
461.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
462. > 	BN_init(&m1);
463.   	BN_init(&r1);
464.   

crypto/bn/bn_lib.c:286:1: start of procedure BN_init()
  284.   	}
  285.   
  286. > void BN_init(BIGNUM *a)
  287.   	{
  288.   	memset(a,0,sizeof(BIGNUM));

crypto/bn/bn_lib.c:288:2: 
  286.   void BN_init(BIGNUM *a)
  287.   	{
  288. > 	memset(a,0,sizeof(BIGNUM));
  289.   	}
  290.   

crypto/bn/bn_lib.c:289:2: return from a call to BN_init
  287.   	{
  288.   	memset(a,0,sizeof(BIGNUM));
  289.   	}
          ^
  290.   
  291.   BIGNUM *BN_new(void)

crypto/rsa/rsa_eay.c:463:2: 
461.   	if ((ctx=BN_CTX_new()) == NULL) goto err;
462.   	BN_init(&m1);
463. > 	BN_init(&r1);
464.   
465.   	if (rsa->flags & RSA_FLAG_CACHE_PRIVATE)

crypto/bn/bn_lib.c:286:1: start of procedure BN_init()
  284.   	}
  285.   
  286. > void BN_init(BIGNUM *a)
  287.   	{
  288.   	memset(a,0,sizeof(BIGNUM));

crypto/bn/bn_lib.c:288:2: 
  286.   void BN_init(BIGNUM *a)
  287.   	{
  288. > 	memset(a,0,sizeof(BIGNUM));
  289.   	}
  290.   

crypto/bn/bn_lib.c:289:2: return from a call to BN_init
  287.   	{
  288.   	memset(a,0,sizeof(BIGNUM));
  289.   	}
          ^
  290.   
  291.   BIGNUM *BN_new(void)

crypto/rsa/rsa_eay.c:465:6: Taking true branch
463.   	BN_init(&r1);
464.   
465.   	if (rsa->flags & RSA_FLAG_CACHE_PRIVATE)
            ^
466.   		{
467.   		if (rsa->_method_mod_p == NULL)

crypto/rsa/rsa_eay.c:467:7: Taking false branch
465.   	if (rsa->flags & RSA_FLAG_CACHE_PRIVATE)
466.   		{
467.   		if (rsa->_method_mod_p == NULL)
             ^
468.   			{
469.   			BN_MONT_CTX* bn_mont_ctx;

crypto/rsa/rsa_eay.c:491:7: Taking false branch
489.   			}
490.   
491.   		if (rsa->_method_mod_q == NULL)
             ^
492.   			{
493.   			BN_MONT_CTX* bn_mont_ctx;

crypto/rsa/rsa_eay.c:516:7: Taking false branch
514.   		}
515.   		
516.   	if (!BN_mod(&r1,I,rsa->q,ctx)) goto err;
             ^
517.   	if (!meth->bn_mod_exp(&m1,&r1,rsa->dmq1,rsa->q,ctx,
518.   		rsa->_method_mod_q)) goto err;

crypto/rsa/rsa_eay.c:517:7: 
515.   		
516.   	if (!BN_mod(&r1,I,rsa->q,ctx)) goto err;
517. > 	if (!meth->bn_mod_exp(&m1,&r1,rsa->dmq1,rsa->q,ctx,
518.   		rsa->_method_mod_q)) goto err;
519.   
