diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-17 09:17:51 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-07-17 09:17:51 +0000 |
commit | 0f683f818cf087d580ba2edf7c096897bc28b95a (patch) | |
tree | 0324365d1cf7ec43679c202681fe55bfa81e439f /testsuite/printf.tests | |
parent | 416914fc6115d2013433a5956febcffb5c8a0466 (diff) | |
download | busybox-w32-0f683f818cf087d580ba2edf7c096897bc28b95a.tar.gz busybox-w32-0f683f818cf087d580ba2edf7c096897bc28b95a.tar.bz2 busybox-w32-0f683f818cf087d580ba2edf7c096897bc28b95a.zip |
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 18f25e3f1..d6b60fb8c 100755 --- a/testsuite/printf.tests +++ b/testsuite/printf.tests | |||
@@ -24,4 +24,10 @@ testing "printf repeatedly use pattern for each argv" \ | |||
24 | "foo\n$HOME\n" \ | 24 | "foo\n$HOME\n" \ |
25 | "" "" | 25 | "" "" |
26 | 26 | ||
27 | # Why ()s are necessary I have no idea... | ||
28 | testing "printf aborts on bare %" \ | ||
29 | "(${bb}printf '%' a b c) 2>&1; echo \$?" \ | ||
30 | "printf: invalid directive '%'\n""1\n" \ | ||
31 | "" "" | ||
32 | |||
27 | exit $FAILCOUNT | 33 | exit $FAILCOUNT |