diff --git a/src/client/GameSave.cpp b/src/client/GameSave.cpp index f95618a7d..8c105353b 100644 --- a/src/client/GameSave.cpp +++ b/src/client/GameSave.cpp @@ -646,6 +646,9 @@ void GameSave::readOPS(char * data, int dataLength) if (inputData[5] != CELL) throw ParseException(ParseException::InvalidDimensions, "Incorrect CELL size"); + if (blockW <= 0 || blockH <= 0) + throw ParseException(ParseException::InvalidDimensions, "Save too small"); + //Too large/off screen if (blockX+blockW > XRES/CELL || blockY+blockH > YRES/CELL) throw ParseException(ParseException::InvalidDimensions, "Save too large");