Skip to content

Missing error status when retries are exhausted #795

Description

@headscott

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;
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions