summaryrefslogtreecommitdiffstats
path: root/test/Analysis/security-syntax-checks.m
diff options
context:
space:
mode:
authorrdivacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
committerrdivacky <rdivacky@FreeBSD.org>2009-12-15 18:49:47 +0000
commit77212133072dc40f070a280af8217032f55a9eb4 (patch)
tree2fd5819f49caecc5f520219b6b9254fe94ebb138 /test/Analysis/security-syntax-checks.m
parent4b08eb6308ca90a6c08e2fc79d100821b1b1f6aa (diff)
downloadFreeBSD-src-77212133072dc40f070a280af8217032f55a9eb4.zip
FreeBSD-src-77212133072dc40f070a280af8217032f55a9eb4.tar.gz
Update clang to 91430.
Diffstat (limited to 'test/Analysis/security-syntax-checks.m')
-rw-r--r--test/Analysis/security-syntax-checks.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/Analysis/security-syntax-checks.m b/test/Analysis/security-syntax-checks.m
index bcdc65e..c63d589 100644
--- a/test/Analysis/security-syntax-checks.m
+++ b/test/Analysis/security-syntax-checks.m
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-apple-darwin10 -analyze -warn-security-syntactic %s -verify
+// RUN: clang -cc1 -triple i386-apple-darwin10 -analyze -warn-security-syntactic %s -verify
// <rdar://problem/6336718> rule request: floating point used as loop
// condition (FLP30-C, FLP-30-CPP)
@@ -96,3 +96,9 @@ void test_rand()
rand_r(&b); // expected-warning{{Function 'rand_r' is obsolete because it implements a poor random number generator. Use 'arc4random' instead}}
random(); // expected-warning{{The 'random' function produces a sequence of values that an adversary may be able to predict. Use 'arc4random' instead}}
}
+
+char *mktemp(char *buf);
+
+void test_mktemp() {
+ char *x = mktemp("/tmp/zxcv"); // expected-warning{{Call to function 'mktemp' is insecure as it always creates or uses insecure temporary file}}
+}
OpenPOWER on IntegriCloud