aboutsummaryrefslogtreecommitdiffstats
path: root/code/qcommon
diff options
context:
space:
mode:
authorthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-04-22 18:24:50 +0000
committerthilo <thilo@edf5b092-35ff-0310-97b2-ce42778d08ea>2006-04-22 18:24:50 +0000
commit5aa090003b6c47a4d10f11975d7f22a2827956b0 (patch)
tree1e43936e2ca3738c24559b6da34aa4525b833623 /code/qcommon
parent97a54acc5cd073c10c61b21291088bb5716aae32 (diff)
downloadioquake3-aero-5aa090003b6c47a4d10f11975d7f22a2827956b0.tar.gz
ioquake3-aero-5aa090003b6c47a4d10f11975d7f22a2827956b0.zip
Fix prohibits illegal downloading of id PK3 files from servers. That bug is hit by *every* official server release from ID.
git-svn-id: svn://svn.icculus.org/quake3/trunk@718 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/qcommon')
-rw-r--r--code/qcommon/files.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/code/qcommon/files.c b/code/qcommon/files.c
index d20b3a1..2630a5c 100644
--- a/code/qcommon/files.c
+++ b/code/qcommon/files.c
@@ -2556,6 +2556,13 @@ FS_idPak
*/
qboolean FS_idPak( char *pak, char *base ) {
int i;
+ char pakbuf[MAX_QPATH], *pakptr;
+
+ // Chop off filename extension if necessary.
+ Com_sprintf(pakbuf, sizeof(pakbuf), "%s", pak);
+ pakptr = Q_strrchr(pakbuf, '.');
+ if(pakptr)
+ *pakptr = '\0';
for (i = 0; i < NUM_ID_PAKS; i++) {
if ( !FS_FilenameCompare(pak, va("%s/pak%d", base, i)) ) {