From 74fca485692c439ddbd5f3a0aa7ef4215635df04 Mon Sep 17 00:00:00 2001 From: Andrey Nazarov Date: Tue, 29 Aug 2023 01:21:55 +0300 Subject: [PATCH] Remove MAX_MAP_PORTAL_BYTES check on receiving end. --- src/server/mvd/parse.c | 3 --- src/server/save.c | 5 +---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/server/mvd/parse.c b/src/server/mvd/parse.c index 4e38453b7..155f94793 100644 --- a/src/server/mvd/parse.c +++ b/src/server/mvd/parse.c @@ -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 { diff --git a/src/server/save.c b/src/server/save.c index b6f1257ee..976e3cbe8 100644 --- a/src/server/save.c +++ b/src/server/save.c @@ -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