summaryrefslogtreecommitdiffstats
path: root/test/Analysis/taint-tester.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/taint-tester.cpp')
-rw-r--r--test/Analysis/taint-tester.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Analysis/taint-tester.cpp b/test/Analysis/taint-tester.cpp
index f97eefb..ca7b729 100644
--- a/test/Analysis/taint-tester.cpp
+++ b/test/Analysis/taint-tester.cpp
@@ -6,7 +6,8 @@ typedef __typeof(sizeof(int)) size_t;
extern FILE *stdin;
typedef long ssize_t;
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
-int printf(const char * __restrict, ...);
+int printf(const char * __restrict, ...);
+int snprintf(char *, size_t, const char *, ...);
void free(void *ptr);
struct GetLineTestStruct {
@@ -25,3 +26,10 @@ void getlineTest(void) {
}
free(line);
}
+
+class opaque;
+void testOpaqueClass(opaque *obj) {
+ char buf[20];
+ snprintf(buf, 20, "%p", obj); // don't crash trying to load *obj
+}
+
OpenPOWER on IntegriCloud