Unverified Commit 9150b644 authored by svetaro's avatar svetaro

SKALE-1795 Fix codacy errors

parent 548865a3
...@@ -254,8 +254,7 @@ bool VerifyShares(const char* publicShares, const char* encr_sshare, const char ...@@ -254,8 +254,7 @@ bool VerifyShares(const char* publicShares, const char* encr_sshare, const char
// std::cerr << "encr_sshare length is " << strlen(encr_sshare) << std::endl; std::cerr << "public shares " << publicShares << std::endl; // std::cerr << "encr_sshare length is " << strlen(encr_sshare) << std::endl; std::cerr << "public shares " << publicShares << std::endl;
std::cerr << "publicShares length is " << strlen(publicShares) std::cerr << "publicShares length is " << std::char_traits<char>::length(publicShares)<<std::endl; //strlen(publicShares)<< std::endl;
<< std::endl;
} }
char pshares[8193]; char pshares[8193];
strncpy(pshares, publicShares, strlen(publicShares) + 1); strncpy(pshares, publicShares, strlen(publicShares) + 1);
...@@ -372,6 +371,7 @@ std::string decrypt_DHKey(const std::string& polyName, int ind){ ...@@ -372,6 +371,7 @@ std::string decrypt_DHKey(const std::string& polyName, int ind){
decrypt_key(eid, &err_status, errMsg1, encrypted_DHkey, DH_enc_len, DHKey); decrypt_key(eid, &err_status, errMsg1, encrypted_DHkey, DH_enc_len, DHKey);
if (err_status != 0){ if (err_status != 0){
free(hexEncrKey);
throw RPCException(ERROR_IN_ENCLAVE, "decrypt key failed in enclave"); throw RPCException(ERROR_IN_ENCLAVE, "decrypt key failed in enclave");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment