From: Quirin Gylstorff <quirin.gylsto...@siemens.com> This fixes the following error with gcc-15:
In function 'bgenv_get_uint', inlined from 'bgenv_get' at env/env_api_fat.c:360:10: env/env_api_fat.c:296:9: error: 'strncpy' output may be truncated copying between 2 and 4 bytes from a string of length 254 [-Werror=stringop-truncation] 296 | strncpy(data, buffer, res+1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ As sprintf adds already a null-terminator and data is a void pointer we can use memcpy directly. Signed-off-by: Quirin Gylstorff <quirin.gylsto...@siemens.com> --- env/env_api_fat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env_api_fat.c b/env/env_api_fat.c index 7c84dc6..b409d45 100644 --- a/env/env_api_fat.c +++ b/env/env_api_fat.c @@ -293,7 +293,7 @@ static int bgenv_get_uint(char *buffer, uint64_t *type, void *data, if (!data) { return res+1; } - strncpy(data, buffer, res+1); + memcpy(data, buffer, res+1); if (type) { *type = t; } -- 2.50.1 -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to efibootguard-dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/efibootguard-dev/20250908083555.77300-1-Quirin.Gylstorff%40siemens.com.