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