Skip to content

🐛 [BUG] - cryptography_interface_kmc_crypto_service.template.c typos in calls to int_to_str #497

@bbrachaczek

Description

@bbrachaczek

Description

See these two calls:

char *key_len_in_bits_str = int_to_str(key_len_in_bits, &key_len_in_bits);

char *key_len_in_bits_str = int_to_str(key_len_in_bits, &key_len_in_bits);

They both pass incorrect second arguments. In both cases, it should be &key_len_in_bits_str_len.

This impacts the later buffer size calculation used for snprintf. I didn't perform an in-depth analysis whether it may cause truncation - maybe not, as there's some slack from factoring in the entire length of the format string.

Branch Name

No response

Reproduction steps

No repro steps: just cursory code review.

Screenshots

Logs

OS

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions