From a1fe170f388aec709ceb176c0dfa6e400a7ac84c Mon Sep 17 00:00:00 2001 From: Garux Date: Fri, 7 Feb 2020 22:35:58 +0300 Subject: [PATCH] fix null pointer dereferencing introduced in 80e95ac165602895b5139a123ae19b3bbb34e895 --- tools/quake3/common/cmdlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index f6733474..a2045070 100644 --- a/tools/quake3/common/cmdlib.c +++ b/tools/quake3/common/cmdlib.c @@ -291,7 +291,7 @@ void Q_mkdir( const char *path ){ if ( errno == ENOENT ) { p = path_get_last_separator( path ); } - if ( !strEmpty( p ) ) { + if ( !strEmptyOrNull( p ) ) { strcpyQ( parentbuf, path, p - path + 1 ); if ( ( p - path ) < (ptrdiff_t) sizeof( parentbuf ) ) { Sys_Printf( "mkdir: %s: creating parent %s first\n", path, parentbuf );