projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f0d7ae
)
- reinstate paranoia check in wrapf().
author
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 18 Jan 2007 08:41:22 +0000
(08:41 -0000)
committer
Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>
Thu, 18 Jan 2007 08:41:22 +0000
(08:41 -0000)
coreutils/stty.c
patch
|
blob
|
history
diff --git
a/coreutils/stty.c
b/coreutils/stty.c
index 3ce8bf3127d91f51eb1d10b23d42fa8c53248c8c..4e665bcb767dcd9274ed6293ef536caec58e7d72 100644
(file)
--- a/
coreutils/stty.c
+++ b/
coreutils/stty.c
@@
-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++;