ssl/tls_srp.c:369: error: UNINITIALIZED_VALUE
  The value read from tmp_len was never initialized.
Showing all 1 steps of the trace


ssl/tls_srp.c:369:3: 
367.   	if (tmp)
368.   		{
369. > 		OPENSSL_cleanse(tmp,tmp_len) ;
370.   		OPENSSL_free(tmp);
371.   		}

int SRP_generate_server_master_secret(SSL *s,unsigned char *master_key)
	{
	BIGNUM *K = NULL, *u = NULL;
	int ret = -1, tmp_len;
	unsigned char *tmp = NULL;
	if (!SRP_Verify_A_mod_N(s->srp_ctx.A,s->srp_ctx.N))
		goto err;
	if (!(u = SRP_Calc_u(s->srp_ctx.A,s->srp_ctx.B,s->srp_ctx.N)))
		goto err;
	if (!(K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b, s->srp_ctx.N)))
		goto err;
	tmp_len = BN_num_bytes(K);
	if ((tmp = OPENSSL_malloc(tmp_len)) == NULL)
		goto err;
	BN_bn2bin(K, tmp);
	ret = s->method->ssl3_enc->generate_master_secret(s,master_key,tmp,tmp_len);
err:
	if (tmp)
		{
		OPENSSL_cleanse(tmp,tmp_len) ;
		OPENSSL_free(tmp);
		}
	BN_clear_free(K);
	BN_clear_free(u);
	return ret;
	}
['int SRP_generate_server_master_secret(SSL *s,unsigned char *master_key)\n\t{\n\tBIGNUM *K = NULL, *u = NULL;\n\tint ret = -1, tmp_len;\n\tunsigned char *tmp = NULL;\n\tif (!SRP_Verify_A_mod_N(s->srp_ctx.A,s->srp_ctx.N))\n\t\tgoto err;\n\tif (!(u = SRP_Calc_u(s->srp_ctx.A,s->srp_ctx.B,s->srp_ctx.N)))\n\t\tgoto err;\n\tif (!(K = SRP_Calc_server_key(s->srp_ctx.A, s->srp_ctx.v, u, s->srp_ctx.b, s->srp_ctx.N)))\n\t\tgoto err;\n\ttmp_len = BN_num_bytes(K);\n\tif ((tmp = OPENSSL_malloc(tmp_len)) == NULL)\n\t\tgoto err;\n\tBN_bn2bin(K, tmp);\n\tret = s->method->ssl3_enc->generate_master_secret(s,master_key,tmp,tmp_len);\nerr:\n\tif (tmp)\n\t\t{\n\t\tOPENSSL_cleanse(tmp,tmp_len) ;\n\t\tOPENSSL_free(tmp);\n\t\t}\n\tBN_clear_free(K);\n\tBN_clear_free(u);\n\treturn ret;\n\t}']