mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
change _FOpenFile to take a dstring for foundname plugging a potential
buffer overflow.
This commit is contained in:
parent
dd297bc12a
commit
b80357afda
7 changed files with 32 additions and 20 deletions
|
@ -132,7 +132,7 @@ locs_add (const vec3_t location, const char *name)
|
|||
void
|
||||
locs_load (const char *filename)
|
||||
{
|
||||
char tmp[PATH_MAX], foundname[MAX_OSPATH];
|
||||
char tmp[PATH_MAX];
|
||||
char *t1, *t2;
|
||||
const char *line;
|
||||
int templength = 0;
|
||||
|
@ -140,7 +140,7 @@ locs_load (const char *filename)
|
|||
QFile *file;
|
||||
|
||||
snprintf (tmp, sizeof (tmp), "maps/%s", filename);
|
||||
templength = _QFS_FOpenFile (tmp, &file, foundname, 1);
|
||||
templength = QFS_FOpenFile (tmp, &file);
|
||||
if (!file) {
|
||||
Con_Printf ("Couldn't load %s\n", tmp);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue