mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
- reinstate paranoia check in wrapf().
This commit is contained in:
parent
7f0d7ae4f5
commit
1a250d9f32
@ -462,8 +462,9 @@ static void wrapf(const char *message, ...)
|
|||||||
va_start(args, message);
|
va_start(args, message);
|
||||||
buflen = vsnprintf(buf, sizeof(buf), message, args);
|
buflen = vsnprintf(buf, sizeof(buf), message, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
/* buflen = strlen(buf); cheaper not to pull in strlen */
|
/* We seem to be called only with suitable lengths, but check if
|
||||||
if (!buflen /*|| buflen >= sizeof(buf)*/) return;
|
somebody failed to adhere to this assumption just to be sure. */
|
||||||
|
if (!buflen || buflen >= sizeof(buf)) return;
|
||||||
|
|
||||||
if (current_col > 0) {
|
if (current_col > 0) {
|
||||||
current_col++;
|
current_col++;
|
||||||
|
Loading…
Reference in New Issue
Block a user