aboutsummaryrefslogtreecommitdiff
path: root/lib/asan/tests/strncpy-overflow.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/asan/tests/strncpy-overflow.cc')
-rw-r--r--lib/asan/tests/strncpy-overflow.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/asan/tests/strncpy-overflow.cc b/lib/asan/tests/strncpy-overflow.cc
deleted file mode 100644
index 044f6494bfa1..000000000000
--- a/lib/asan/tests/strncpy-overflow.cc
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-int main(int argc, char **argv) {
- char *hello = (char*)malloc(6);
- strcpy(hello, "hello");
- char *short_buffer = (char*)malloc(9);
- strncpy(short_buffer, hello, 10); // BOOM
- return short_buffer[8];
-}