mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
Fix a potential buffer underflow.
This commit is contained in:
parent
8c67a872c6
commit
08fa6be9f4
1 changed files with 1 additions and 1 deletions
|
@ -651,7 +651,7 @@ qfs_expand_path (dstring_t *full_path, const char *base, const char *path,
|
|||
if (*cpath == '/')
|
||||
separator = "";
|
||||
len = strlen (base);
|
||||
if (base[len -1] == '/')
|
||||
if (len && base[len - 1] == '/')
|
||||
len--;
|
||||
dsprintf (full_path, "%.*s%s%s", len, base, separator, cpath);
|
||||
free (cpath);
|
||||
|
|
Loading…
Reference in a new issue