commit 272a7c525a51c12efcb662a9b19804eb3dca960f parent 7745e1a47059c54e3dec5a271ce31f6b119cc961 Author: bsandro <email@bsandro.tech> Date: Wed, 23 Apr 2025 00:15:32 +0300 strdup -> strndup Diffstat:
M | gui/ui.c | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gui/ui.c b/gui/ui.c @@ -242,7 +242,7 @@ void ShowModalWindow(UIWindow *parent, const char *def_dir, const char *def_file init_path[0] = '.'; init_path[1] = '\0'; } else { - init_path = strdup(def_dir); + init_path = strndup(def_dir, PATH_MAX-1); } table->e.cp = (void *)init_path; table->e.messageUser = TableEvent;