From 0f683f818cf087d580ba2edf7c096897bc28b95a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 17 Jul 2008 09:17:51 +0000 Subject: printf: protect against bogus format specifiers. Hopefully closes bug 4184 --- testsuite/printf.tests | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'testsuite/printf.tests') 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" \ "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 -- cgit v1.2.3