Affected Code:
src/pk/ecc/ecc_sign_hash_internal.c:102
if (max_iterations == 0) {
goto errnokey;
}
When all LTC_PK_MAX_RETRIES attempts are exhausted without producing a valid signature, the code jumps to errnokey without setting err. This can cause the function to incorrectly return CRYPT_OK.
Suggested fix:
if (max_iterations == 0) {
err = CRYPT_ERROR;
goto errnokey;
}
Affected Code:
src/pk/ecc/ecc_sign_hash_internal.c:102
When all
LTC_PK_MAX_RETRIESattempts are exhausted without producing a valid signature, the code jumps toerrnokeywithout settingerr. This can cause the function to incorrectly returnCRYPT_OK.Suggested fix: