Skip to content

Commit

Permalink
Remove MAX_MAP_PORTAL_BYTES check on receiving end.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet authored and res2k committed Jan 25, 2024
1 parent b16aaab commit 74fca48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 deletions src/server/mvd/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,6 @@ static void MVD_ParseFrame(mvd_t *mvd)
if (length < 0 || msg_read.readcount + length > msg_read.cursize) {
MVD_Destroyf(mvd, "%s: read past end of message", __func__);
}
if (length > MAX_MAP_PORTAL_BYTES) {
MVD_Destroyf(mvd, "%s: bad portalbits length: %d", __func__, length);
}
data = msg_read.data + msg_read.readcount;
msg_read.readcount += length;
} else {
Expand Down
5 changes: 1 addition & 4 deletions src/server/save.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,9 @@ static int read_level_file(void)
Com_Error(ERR_DROP, "Savegame configstring too long");
}

len = MSG_ReadByte();
if (len > MAX_MAP_PORTAL_BYTES)
Com_Error(ERR_DROP, "Savegame portalbits too long");

SV_ClearWorld();

len = MSG_ReadByte();
CM_SetPortalStates(&sv.cm, MSG_ReadData(len), len);

// read game level
Expand Down

0 comments on commit 74fca48

Please sign in to comment.