diff options
author | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-02-07 23:10:53 +0000 |
---|---|---|
committer | Jean-Daniel Dupas <devlists@shadowlab.org> | 2012-02-07 23:10:53 +0000 |
commit | 2837a2f02195e624b14b419b2d3e6682a6bc5a0f (patch) | |
tree | eb5224db217fdf43b77de1d380666fd6f1e28edc /test/Sema/format-strings.c | |
parent | d08900848307fdaea19d52249bdced94eefdb9bb (diff) |
non-literal strftime format string is not unsafe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/format-strings.c')
-rw-r--r-- | test/Sema/format-strings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c index 3a95df5038..dcff75a07a 100644 --- a/test/Sema/format-strings.c +++ b/test/Sema/format-strings.c @@ -491,6 +491,7 @@ void __attribute__((format(strftime,1,0))) dateformat(const char *fmt); void test_other_formats() { char *str = ""; monformat("", 1); // expected-warning{{format string is empty}} + monformat(str); // expected-warning{{format string is not a string literal (potentially insecure)}} dateformat(""); // expected-warning{{format string is empty}} - dateformat(str); // expected-warning{{format string is not a string literal (potentially insecure)}} + dateformat(str); // no-warning (using strftime non literal is not unsafe) } |