Skip to content

Commit

Permalink
workaround __builtin_strncpy bounds checking
Browse files Browse the repository at this point in the history
rnpnr committed May 18, 2024
1 parent 783b7ef commit efafa3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/ccan-config.c
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit efafa3c

Please sign in to comment.