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:
918a34b
)
tr: fix "tr [=" case. Closes bug 4374.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 28 Jul 2008 23:49:42 +0000
(23:49 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 28 Jul 2008 23:49:42 +0000
(23:49 -0000)
function old new delta
expand 1701 1738 +37
tr_main 472 474 +2
coreutils/tr.c
patch
|
blob
|
history
diff --git
a/coreutils/tr.c
b/coreutils/tr.c
index 28798fe4ff5d0c0ddbec58a2d3ffd3fc6b286d8f..860b8122bb7027d3ee5c6bcf961eb25139571ee7 100644
(file)
--- a/
coreutils/tr.c
+++ b/
coreutils/tr.c
@@
-135,6
+135,8
@@
static unsigned int expand(const char *arg, char *buffer)
/* "[xyz...", i=x, arg points to y */
if (ENABLE_FEATURE_TR_EQUIV && i == '=') { /* [=CHAR=] */
*buffer++ = *arg; /* copy CHAR */
+ if (!*arg || arg[1] != '=' || arg[2] != ']')
+ bb_show_usage();
arg += 3; /* skip CHAR=] */
continue;
}