klibc-bot for Herbert Xu
2020-Mar-28 21:48 UTC
[klibc] [klibc:update-dash] dash: builtin: Reset t_wp_op in testcmd
Commit-ID: e909caa28f9822a4d8610bbf0f3344f613928b43 Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=e909caa28f9822a4d8610bbf0f3344f613928b43 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Mon, 13 Jul 2015 14:06:35 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:54 +0000 [klibc] dash: builtin: Reset t_wp_op in testcmd [ dash commit 2e5842258bd5b252ffdaa630db09c9a19a9717ca ] The global variable t_wp_op needs to be reset every time testcmd is called or it may cause incorrect parsing of the arguments. Reported-by: Martijn Dekker <martijn at inlv.org> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/bltin/test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/dash/bltin/test.c b/usr/dash/bltin/test.c index bab9a1f9..58c05fec 100644 --- a/usr/dash/bltin/test.c +++ b/usr/dash/bltin/test.c @@ -193,6 +193,8 @@ testcmd(int argc, char **argv) argv[argc] = NULL; } + t_wp_op = NULL; + recheck: argv++; argc--;
Reasonably Related Threads
- [klibc:update-dash] builtin: Reset t_wp_op in testcmd
- [klibc:update-dash] dash: builtin: Greater resolution in test -nt / test -ot
- [klibc:update-dash] builtin: Greater resolution in test -nt / test -ot
- [klibc:update-dash] dash: [BUILTIN] Correctly handle test ! ! = !
- [klibc:update-dash] [BUILTIN] Correctly handle test ! ! = !