diff options
author | Denis Vlasenko | 2008-07-17 09:17:51 +0000 |
---|---|---|
committer | Denis Vlasenko | 2008-07-17 09:17:51 +0000 |
commit | 0f683f818cf087d580ba2edf7c096897bc28b95a (patch) | |
tree | 0324365d1cf7ec43679c202681fe55bfa81e439f /testsuite/printf.tests | |
parent | 416914fc6115d2013433a5956febcffb5c8a0466 (diff) | |
download | busybox-0f683f818cf087d580ba2edf7c096897bc28b95a.zip busybox-0f683f818cf087d580ba2edf7c096897bc28b95a.tar.gz |
printf: protect against bogus format specifiers. Hopefully closes bug 4184
Diffstat (limited to 'testsuite/printf.tests')
-rwxr-xr-x | testsuite/printf.tests | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/printf.tests b/testsuite/printf.tests index 18f25e3..d6b60fb 100755 --- a/testsuite/printf.tests +++ b/testsuite/printf.tests @@ -24,4 +24,10 @@ testing "printf repeatedly use pattern for each argv" \ "foo\n$HOME\n" \ "" "" +# Why ()s are necessary I have no idea... +testing "printf aborts on bare %" \ + "(${bb}printf '%' a b c) 2>&1; echo \$?" \ + "printf: invalid directive '%'\n""1\n" \ + "" "" + exit $FAILCOUNT |