buffer overflow fix

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1534 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
TimeServ 2005-10-22 21:57:33 +00:00
parent 9134a6e097
commit 87ff696bb1

View file

@ -122,7 +122,7 @@ extern mtexinfo_t r_skytexinfo[6];
extern cvar_t gl_skyboxname;
char skyname[128];
char skyname[64];
/*
================
@ -137,11 +137,11 @@ void R_LoadSkyBox (void)
char pathname[MAX_QPATH];
for (i=0 ; i<6 ; i++)
{
sprintf (pathname, "env/%s%s.tga", skyname, suf[r_skysideimage[i]]);
_snprintf (pathname, MAX_QPATH-1, "env/%s%s.tga", skyname, suf[r_skysideimage[i]]);
r_skytexinfo[i].texture = Mod_LoadWall (pathname); //preferable
if (!r_skytexinfo[i].texture)
{
sprintf (pathname, "env/%s%s.pcx", skyname, suf[r_skysideimage[i]]);
_snprintf (pathname, MAX_QPATH-1, "env/%s%s.pcx", skyname, suf[r_skysideimage[i]]);
r_skytexinfo[i].texture = Mod_LoadWall (pathname); //q2 fall back
}
if (!r_skytexinfo[i].texture)