aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-18 10:52:22 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-18 10:54:28 -0600
commitefafa3c178268a4149fc3e432bc1174a013c16de (patch)
treef67e7b97fe3a0fd22059eab2db410d458c4f6cf6
parent783b7ef67aa360f0b9bd44fa5ea47e644bc49d69 (diff)
downloadvis-efafa3c178268a4149fc3e432bc1174a013c16de.tar.gz
vis-efafa3c178268a4149fc3e432bc1174a013c16de.tar.xz
workaround __builtin_strncpy bounds checking
-rw-r--r--core/ccan-config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/ccan-config.c b/core/ccan-config.c
index d118df0..f358f04 100644
--- a/core/ccan-config.c
+++ b/core/ccan-config.c
@@ -281,7 +281,7 @@ static struct test tests[] = {
"#include <string.h>\n"
"int main(int argc, char *argv[]) {\n"
" char pad[sizeof(int *) * 1];\n"
- " strncpy(pad, argv[0], sizeof(pad));\n"
+ " memcpy(pad, argv[0], sizeof(pad));\n"
" return *(int *)(pad) == *(int *)(pad + 1);\n"
"}\n" },
{ "HAVE_UTIME", DEFINES_FUNC, NULL, NULL,