From ccc5c3aec17832c6ec1ebe028a1091eee4c5a3ac Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sat, 13 Sep 2025 17:05:30 -0300 Subject: [PATCH] Fix strncpy warnings --- src/86box.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/86box.c b/src/86box.c index 44b6793e4..18681d743 100644 --- a/src/86box.c +++ b/src/86box.c @@ -1153,11 +1153,13 @@ usage: start_vmm = 1; } else { strncpy(vmm_path, vmm_path_cfg, sizeof(vmm_path) - 1); + vmm_path[sizeof(vmm_path) - 1] = '\0'; } if (start_vmm) { pclog("# VM Manager enabled. Path: %s\n", vmm_path); strncpy(usr_path, vmm_path, sizeof(usr_path) - 1); + usr_path[sizeof(usr_path) - 1] = '\0'; } else #endif {