summaryrefslogtreecommitdiff
path: root/tests/test_stpncpy_overwrite_over.c
diff options
context:
space:
mode:
authorjvoisin2023-12-27 17:07:32 +0100
committerJulien Voisin2023-12-28 16:13:37 +0100
commit22a8094b41b2606084dc0c0c70487e5ed0fcb652 (patch)
treef4499d34e006bdc4a762af7f407e87a1080fc3ee /tests/test_stpncpy_overwrite_over.c
parentf3c0bfdb96ec00aaefdb75024059aa33895726c5 (diff)
Re-enable previously disabled overlap checks
They were previously disabled in 80a83a5
Diffstat (limited to 'tests/test_stpncpy_overwrite_over.c')
-rw-r--r--tests/test_stpncpy_overwrite_over.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_stpncpy_overwrite_over.c b/tests/test_stpncpy_overwrite_over.c
index 004e2b8..21c88ce 100644
--- a/tests/test_stpncpy_overwrite_over.c
+++ b/tests/test_stpncpy_overwrite_over.c
@@ -3,15 +3,16 @@
3#include <string.h> 3#include <string.h>
4 4
5int main(int argc, char** argv) { 5int main(int argc, char** argv) {
6#if 0
7 char buffer[9] = {'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', '\0'}; 6 char buffer[9] = {'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', '\0'};
8 puts(buffer); 7 puts(buffer);
9 8
9 stpncpy(buffer, buffer+5, 2);
10 puts(buffer);
11
10 CHK_FAIL_START 12 CHK_FAIL_START
11 stpncpy(buffer+1, buffer, 5); 13 stpncpy(buffer+1, buffer, 5);
12 CHK_FAIL_END 14 CHK_FAIL_END
13 15
14 puts(buffer); 16 puts(buffer);
15#endif
16 return ret; 17 return ret;
17} 18}