1
0
mirror of https://github.com/wolfSSL/wolfssl.git synced 2026-10-24 04:09:07 +03:00
Files
wolfssl/wolfcrypt
Tobias Frauenschläger 5a02fa04d9 Bound error-message and time-string formatting under WOLF_C89
Under WOLF_C89, XSNPRINTF is sprintf and ignores the size argument.
WOLFSSL_ERROR_LINE formatted the source file name into an 80-byte
buffer and wolfSSL_ERR_print_errors formatted the reason and file into
a 160-byte one, so long __FILE__ paths, as CMake builds produce,
overflowed the stack. GetTimeString wrote its 24-character string
regardless of the length wolfSSL_ASN1_TIME_to_string was given.

Bound the file name and reason with a precision, and format the time
into a local buffer and copy it only when it fits the caller's length.
2026-10-15 17:24:03 +02:00
..