summaryrefslogtreecommitdiff
path: root/tests/test_memcpy_static_read.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_memcpy_static_read.c')
-rw-r--r--tests/test_memcpy_static_read.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_memcpy_static_read.c b/tests/test_memcpy_static_read.c
new file mode 100644
index 0000000..fed67a8
--- /dev/null
+++ b/tests/test_memcpy_static_read.c
@@ -0,0 +1,16 @@
1#include "common.h"
2
3#include <string.h>
4
5int main(int argc, char** argv) {
6 char buffer[8] = {0};
7 memcpy(buffer, "123456", 4);
8 puts(buffer);
9
10 CHK_FAIL_START
11 memcpy(buffer, "123456", sizeof(buffer));
12 CHK_FAIL_END
13
14 puts(buffer);
15 return ret;
16}