From 82f35edeb92296a28633373a780b6b8e190bde1f Mon Sep 17 00:00:00 2001 From: Nandor Kracser Date: Thu, 10 Sep 2026 08:07:10 +0200 Subject: [PATCH] fix: use memcpy for the non-terminated copy Linux 7.2 removed strncpy() from , so the in-kernel build fails with an implicit declaration. This copy was memcpy semantics all along: cp_len bytes into a buffer the caller then advances by cp_len, no NUL involved. --- sigv4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sigv4.c b/sigv4.c index d01f944..b9a49d3 100644 --- a/sigv4.c +++ b/sigv4.c @@ -55,7 +55,7 @@ static unsigned char *aws_sigv4_vslprintf(unsigned char *buf, unsigned char *las goto finished; } size_t cp_len = n_max >= str->len ? str->len : n_max; - strncpy((char *)c_ptr, (char *)str->data, cp_len); + memcpy((char *)c_ptr, (char *)str->data, cp_len); c_ptr += cp_len; fmt += 2; }