Fixes

parent 71c62534
......@@ -180,7 +180,7 @@ std::shared_ptr<BLSSigShare> BLSPrivateKeyShareSGX::signWithHelperSGX(
int sigLen;
if ((sigLen = strnlen(signature, 10)) < 10) {
BOOST_THROW_EXCEPTION(runtime_error("Signature too short:" + sigLen));
BOOST_THROW_EXCEPTION(runtime_error("Signature too short:" + to_string(sigLen)));
}
......
......@@ -251,7 +251,7 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
decrypt_key(err_status, err_string, encrypted_key, enc_len, key);
if (err_status != 0) {
if (*err_status != 0) {
return;
}
......@@ -259,6 +259,11 @@ void bls_sign_message(int *err_status, char *err_string, uint8_t *encrypted_key,
strncpy(signature, sig, BUF_LEN);
if (strnlen(signature, BUF_LEN) < 10) {
*err_status = -1;
return;
}
}
......
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