crypto/evp/m_sigver.c:141: error: UNINITIALIZED_VALUE
  The value read from mdlen was never initialized.
Showing all 1 steps of the trace


crypto/evp/m_sigver.c:141:7: 
139.   		if (sctx || !r)
140.   			return r;
141. > 		if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0)
142.   			return 0;
143.   		}

int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen)
	{
	int sctx, r = 0;
	if (ctx->pctx->pmeth->signctx)
		sctx = 1;
	else
		sctx = 0;
	if (sigret)
		{
		MS_STATIC EVP_MD_CTX tmp_ctx;
		unsigned char md[EVP_MAX_MD_SIZE];
		unsigned int mdlen;
		EVP_MD_CTX_init(&tmp_ctx);
		if (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx))
		     	return 0;
		if (sctx)
			r = tmp_ctx.pctx->pmeth->signctx(tmp_ctx.pctx,
					sigret, siglen, &tmp_ctx);
		else
			r = EVP_DigestFinal_ex(&tmp_ctx,md,&mdlen);
		EVP_MD_CTX_cleanup(&tmp_ctx);
		if (sctx || !r)
			return r;
		if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0)
			return 0;
		}
	else
		{
		if (sctx)
			{
			if (ctx->pctx->pmeth->signctx(ctx->pctx,
						sigret, siglen, ctx) <= 0)
				return 0;
			}
		else if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL,
						EVP_MD_size(ctx->digest)) <= 0)
			return 0;
		}
	return 1;
	}
['int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, size_t *siglen)\n\t{\n\tint sctx, r = 0;\n\tif (ctx->pctx->pmeth->signctx)\n\t\tsctx = 1;\n\telse\n\t\tsctx = 0;\n\tif (sigret)\n\t\t{\n\t\tMS_STATIC EVP_MD_CTX tmp_ctx;\n\t\tunsigned char md[EVP_MAX_MD_SIZE];\n\t\tunsigned int mdlen;\n\t\tEVP_MD_CTX_init(&tmp_ctx);\n\t\tif (!EVP_MD_CTX_copy_ex(&tmp_ctx,ctx))\n\t\t     \treturn 0;\n\t\tif (sctx)\n\t\t\tr = tmp_ctx.pctx->pmeth->signctx(tmp_ctx.pctx,\n\t\t\t\t\tsigret, siglen, &tmp_ctx);\n\t\telse\n\t\t\tr = EVP_DigestFinal_ex(&tmp_ctx,md,&mdlen);\n\t\tEVP_MD_CTX_cleanup(&tmp_ctx);\n\t\tif (sctx || !r)\n\t\t\treturn r;\n\t\tif (EVP_PKEY_sign(ctx->pctx, sigret, siglen, md, mdlen) <= 0)\n\t\t\treturn 0;\n\t\t}\n\telse\n\t\t{\n\t\tif (sctx)\n\t\t\t{\n\t\t\tif (ctx->pctx->pmeth->signctx(ctx->pctx,\n\t\t\t\t\t\tsigret, siglen, ctx) <= 0)\n\t\t\t\treturn 0;\n\t\t\t}\n\t\telse if (EVP_PKEY_sign(ctx->pctx, sigret, siglen, NULL,\n\t\t\t\t\t\tEVP_MD_size(ctx->digest)) <= 0)\n\t\t\treturn 0;\n\t\t}\n\treturn 1;\n\t}']