diff options
-rw-r--r-- | test/Analysis/taint-tester.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Analysis/taint-tester.c b/test/Analysis/taint-tester.c index 4aa170ce21..1f97fbab0f 100644 --- a/test/Analysis/taint-tester.c +++ b/test/Analysis/taint-tester.c @@ -151,6 +151,15 @@ void stdinTest3() { int jjj = iii;// expected-warning + {{tainted}} } +// Test that stdin does not get invalidated by calls. +void foo(); +void stdinTest4() { + int i; + fscanf(stdin, "%d", &i); + foo(); + int j = i; // expected-warning + {{tainted}} +} + // Test propagation functions - the ones that propagate taint from arguments to // return value, ptr arguments. |