svn commit: trunk/busybox/coreutils

vda at busybox.net vda at busybox.net
Mon Jul 28 23:49:42 UTC 2008


Author: vda
Date: 2008-07-28 16:49:42 -0700 (Mon, 28 Jul 2008)
New Revision: 22974

Log:
tr: fix "tr [=" case. Closes bug 4374.

function                                             old     new   delta
expand                                              1701    1738     +37
tr_main                                              472     474      +2



Modified:
   trunk/busybox/coreutils/tr.c


Changeset:
Modified: trunk/busybox/coreutils/tr.c
===================================================================
--- trunk/busybox/coreutils/tr.c	2008-07-28 23:17:31 UTC (rev 22973)
+++ trunk/busybox/coreutils/tr.c	2008-07-28 23:49:42 UTC (rev 22974)
@@ -135,6 +135,8 @@
 			/* "[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;
 			}




More information about the busybox-cvs mailing list