printf: protect against bogus format specifiers. Hopefully closes bug 4184

This commit is contained in:
Denis Vlasenko committed 2008-07-17 09:17:51 +00:00
1 parent 416914fc61
commit 0f683f818c
2 files changed
+19 -9

No files matched your search

+6
View File
@@ -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