← Commit list

1a250d9f3

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2007-01-18
FAILED Duration: 3s

Subject

- reinstate paranoia check in wrapf().

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

coreutils/stty.c+3 -2
@@ -462,8 +462,9 @@ static void wrapf(const char *message, ...)
va_start(args, message);
buflen = vsnprintf(buf, sizeof(buf), message, args);
va_end(args);
- /* buflen = strlen(buf); cheaper not to pull in strlen */
- if (!buflen /*|| buflen >= sizeof(buf)*/) return;
+ /* We seem to be called only with suitable lengths, but check if
+ somebody failed to adhere to this assumption just to be sure. */
+ if (!buflen || buflen >= sizeof(buf)) return;
if (current_col > 0) {
current_col++;