Add null/empty parameter guard to FS_CreatePath

This commit is contained in:
Tim Angus 2025-09-01 19:40:16 +01:00
parent 6b4b1dc84d
commit 693c1f1e92

View File

@ -547,6 +547,10 @@ qboolean FS_CreatePath (const char *OSPath) {
char *ofs;
char path[MAX_OSPATH];
if (!OSPath || !*OSPath) {
return qfalse;
}
// make absolutely sure that it can't back up the path
// FIXME: is c: allowed???
if ( strstr( OSPath, ".." ) || strstr( OSPath, "::" ) ) {