crypto/engine/hw_sureware.c:946: error: UNINITIALIZED_VALUE
  The value read from tlen was never initialized.
Showing all 1 steps of the trace


crypto/engine/hw_sureware.c:946:9: 
944.   		}
945.   	}
946. > 	return ret==1 ? tlen : ret;
947.   }
948.   

static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char *to,
			    RSA *rsa,int padding)
{
	int ret=0,tlen;
	char *hptr=NULL;
	char msg[64]="ENGINE_rsa_sign";
	if (!p_surewarehk_Rsa_Sign)
	{
		SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ENGINE_R_NOT_INITIALISED);
	}
	else if (!(hptr=RSA_get_ex_data(rsa, rsaHndidx)))
	{
		SUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,SUREWARE_R_MISSING_KEY_COMPONENTS);
	}
	else
	{
		switch (padding)
		{
		case RSA_PKCS1_PADDING:
			ret=p_surewarehk_Rsa_Sign(msg,flen,(unsigned char *)from,&tlen,to,hptr,SUREWARE_PKCS1_PAD);
			surewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ret);
			break;
		case RSA_NO_PADDING:
		default:
			RSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,RSA_R_UNKNOWN_PADDING_TYPE);
		}
	}
	return ret==1 ? tlen : ret;
}
['static int surewarehk_rsa_sign(int flen,const unsigned char *from,unsigned char *to,\n\t\t\t    RSA *rsa,int padding)\n{\n\tint ret=0,tlen;\n\tchar *hptr=NULL;\n\tchar msg[64]="ENGINE_rsa_sign";\n\tif (!p_surewarehk_Rsa_Sign)\n\t{\n\t\tSUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ENGINE_R_NOT_INITIALISED);\n\t}\n\telse if (!(hptr=RSA_get_ex_data(rsa, rsaHndidx)))\n\t{\n\t\tSUREWAREerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,SUREWARE_R_MISSING_KEY_COMPONENTS);\n\t}\n\telse\n\t{\n\t\tswitch (padding)\n\t\t{\n\t\tcase RSA_PKCS1_PADDING:\n\t\t\tret=p_surewarehk_Rsa_Sign(msg,flen,(unsigned char *)from,&tlen,to,hptr,SUREWARE_PKCS1_PAD);\n\t\t\tsurewarehk_error_handling(msg,SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,ret);\n\t\t\tbreak;\n\t\tcase RSA_NO_PADDING:\n\t\tdefault:\n\t\t\tRSAerr(SUREWARE_F_SUREWAREHK_RSA_PRIV_ENC,RSA_R_UNKNOWN_PADDING_TYPE);\n\t\t}\n\t}\n\treturn ret==1 ? tlen : ret;\n}']