
...
In this noncompliant code example, snprintf()
is assumed to succeed. However, if the call fails (for example, because of insufficient memory, as described in GNU libc bug 441945), the subsequent call to log_message()
has undefined behavior 174 because the character buffer is uninitialized and need not be null-terminated.
...