diff options
| author | Hans Wennborg <hans@hanshq.net> | 2011-12-10 13:20:11 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2011-12-10 13:20:11 +0000 |
| commit | b1a5e09f6fda84cd1b4af43fa4a85547bf2c2c56 (patch) | |
| tree | bfb864b39e601d7ac5c827fd81e381d411711f81 /clang/test/Analysis/taint-tester.c | |
| parent | 29dad49cfd3fe31596b5e574578e2c9383100d4b (diff) | |
| download | bcm5719-llvm-b1a5e09f6fda84cd1b4af43fa4a85547bf2c2c56.tar.gz bcm5719-llvm-b1a5e09f6fda84cd1b4af43fa4a85547bf2c2c56.zip | |
Check that arguments to a scanf call match the format specifier,
and offer fixits when there is a mismatch.
llvm-svn: 146326
Diffstat (limited to 'clang/test/Analysis/taint-tester.c')
| -rw-r--r-- | clang/test/Analysis/taint-tester.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Analysis/taint-tester.c b/clang/test/Analysis/taint-tester.c index 8a82cd397ae..da1ff024d10 100644 --- a/clang/test/Analysis/taint-tester.c +++ b/clang/test/Analysis/taint-tester.c @@ -49,8 +49,8 @@ void taintTracking(int x) { // Taint on fields of a struct. struct XYStruct xy = {2, 3, 11}; - scanf("%f", &xy.y); - scanf("%f", &xy.x); + scanf("%d", &xy.y); + scanf("%d", &xy.x); int tx = xy.x; // expected-warning {{tainted}} int ty = xy.y; // FIXME: This should be tainted as well. char ntz = xy.z;// no warning |

