aboutsummaryrefslogtreecommitdiff
path: root/coreutils/stty.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-18 08:41:22 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-18 08:41:22 +0000
commit1a250d9f32361b30a8a632ecc0023680b1e38323 (patch)
tree634f2b8f7993201c71c790ff05a1c78499557cf3 /coreutils/stty.c
parent7f0d7ae4f55a810d57ef07d5cd964435dd87e6dc (diff)
downloadbusybox-w32-1a250d9f32361b30a8a632ecc0023680b1e38323.tar.gz
busybox-w32-1a250d9f32361b30a8a632ecc0023680b1e38323.tar.bz2
busybox-w32-1a250d9f32361b30a8a632ecc0023680b1e38323.zip
- reinstate paranoia check in wrapf().
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r--coreutils/stty.c5
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++;