From f9bad6c9d5a5cbfb4dd9d45c55674a58c029c306 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Thu, 16 Apr 2026 12:57:47 -0400 Subject: Remove sizeof call --- tests/test_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_str.c b/tests/test_str.c index 85c8fb9..aac5d71 100644 --- a/tests/test_str.c +++ b/tests/test_str.c @@ -341,7 +341,7 @@ void test_strip() { STASIS_ASSERT(strip(NULL) == NULL, "incorrect return type"); for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) { char *buf = calloc(255, sizeof(*buf)); - strncpy(buf, tc[i].data, sizeof(buf) - 1); + strncpy(buf, tc[i].data, 254); char *result = strip(buf); STASIS_ASSERT(strcmp(result ? result : "", tc[i].expected) == 0, "incorrect strip-from-right"); guard_free(buf); -- cgit