From 3375426d8c18f43f58ab83c261735b04562828ae Mon Sep 17 00:00:00 2001 From: jvoisin Date: Wed, 24 Apr 2024 18:36:10 +0200 Subject: Add a test --- tests/Makefile | 1 + tests/test_issue57_strcpy.c | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 tests/test_issue57_strcpy.c (limited to 'tests') diff --git a/tests/Makefile b/tests/Makefile index 81a1943..c18898e 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -43,6 +43,7 @@ RUNTIME_TARGETS= \ test_getlogin_r_dynamic \ test_getlogin_r_static \ test_issue57 \ + test_issue57_strcpy \ test_mbsrtowcs_dynamic \ test_mbsrtowcs_static \ test_mbstowcs_dynamic \ diff --git a/tests/test_issue57_strcpy.c b/tests/test_issue57_strcpy.c new file mode 100644 index 0000000..24f8ab1 --- /dev/null +++ b/tests/test_issue57_strcpy.c @@ -0,0 +1,11 @@ +#include "common.h" + +#include + +int main(int argc, char** argv) { + char buffer[32] ={'a', 'b', 'c', 0}; + strcpy(buffer , buffer + 16); + puts(buffer); + + return ret; +} -- cgit v1.3