diff options
author | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-18 08:41:22 +0000 |
---|---|---|
committer | aldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-01-18 08:41:22 +0000 |
commit | 5c28433635d4aad88a4eed42a53f6dc0ca3b22d9 (patch) | |
tree | 634f2b8f7993201c71c790ff05a1c78499557cf3 | |
parent | c4f0030869255dc3b726ab1369ba0e33439f6e38 (diff) | |
download | busybox-w32-5c28433635d4aad88a4eed42a53f6dc0ca3b22d9.tar.gz busybox-w32-5c28433635d4aad88a4eed42a53f6dc0ca3b22d9.tar.bz2 busybox-w32-5c28433635d4aad88a4eed42a53f6dc0ca3b22d9.zip |
- reinstate paranoia check in wrapf().
git-svn-id: svn://busybox.net/trunk/busybox@17361 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | coreutils/stty.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 3ce8bf312..4e665bcb7 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -462,8 +462,9 @@ static void wrapf(const char *message, ...) | |||
462 | va_start(args, message); | 462 | va_start(args, message); |
463 | buflen = vsnprintf(buf, sizeof(buf), message, args); | 463 | buflen = vsnprintf(buf, sizeof(buf), message, args); |
464 | va_end(args); | 464 | va_end(args); |
465 | /* buflen = strlen(buf); cheaper not to pull in strlen */ | 465 | /* We seem to be called only with suitable lengths, but check if |
466 | if (!buflen /*|| buflen >= sizeof(buf)*/) return; | 466 | somebody failed to adhere to this assumption just to be sure. */ |
467 | if (!buflen || buflen >= sizeof(buf)) return; | ||
467 | 468 | ||
468 | if (current_col > 0) { | 469 | if (current_col > 0) { |
469 | current_col++; | 470 | current_col++; |