From 0843d5b9fcaea99b0e586a7a2b3a58d9e5df4ffe Mon Sep 17 00:00:00 2001 From: FunkyFr3sh Date: Tue, 10 Dec 2024 20:52:36 +0100 Subject: [PATCH] add strncpy fix --- src/render_ogl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render_ogl.c b/src/render_ogl.c index 1630fc5..7830f02 100644 --- a/src/render_ogl.c +++ b/src/render_ogl.c @@ -255,6 +255,7 @@ static void ogl_build_programs() { char shader_path_tmp[MAX_PATH] = { 0 }; strncpy(shader_path_tmp, shader_path, sizeof(shader_path_tmp)); + shader_path[sizeof(shader_path_tmp) - 1] = '\0'; /* strncpy fix */ if (strlen(shader_path_tmp) <= sizeof(shader_path_tmp) - 8) {