From 89430400d97aec5d9df90e3c955020ba42c1bf85 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Fri, 14 Feb 2025 01:51:50 +0300 Subject: [PATCH] engine: sys_con: only allow names that start with either alphabetic or numerical character for a log file --- engine/common/sys_con.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/common/sys_con.c b/engine/common/sys_con.c index ccb5165c..986922ac 100644 --- a/engine/common/sys_con.c +++ b/engine/common/sys_con.c @@ -81,7 +81,7 @@ void Sys_InitLog( void ) if( Sys_CheckParm( "-log" )) { - if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ) || s_ld.log_path[0] == '-' ) + if( !Sys_GetParmFromCmdLine( "-log", s_ld.log_path ) || !isalnum( s_ld.log_path[0] )) Q_strncpy( s_ld.log_path, "engine.log", sizeof( s_ld.log_path )); COM_DefaultExtension( s_ld.log_path, ".log", sizeof( s_ld.log_path ));