diff --git a/src/pmf/Level.php b/src/pmf/Level.php index 2da3554dc..de444d5d3 100644 --- a/src/pmf/Level.php +++ b/src/pmf/Level.php @@ -106,6 +106,9 @@ class PMFLevel extends PMF{ } $this->seek(5); $this->levelData["version"] = ord($this->read(1)); + if($this->levelData["version"] > PMF_CURRENT_LEVEL_VERSION){ + return false; + } $this->levelData["name"] = $this->read(Utils::readShort($this->read(2), false)); $this->levelData["seed"] = Utils::readInt($this->read(4)); $this->levelData["time"] = Utils::readInt($this->read(4)); diff --git a/src/pmf/Plugin.php b/src/pmf/Plugin.php index d433a9209..7b9592b30 100644 --- a/src/pmf/Plugin.php +++ b/src/pmf/Plugin.php @@ -49,6 +49,9 @@ class PMFPlugin extends PMF{ } $this->seek(5); $this->pluginData["fversion"] = ord($this->read(1)); + if($this->pluginData["fversion"] > PMF_CURRENT_PLUGIN_VERSION){ + return false; + } $this->pluginData["name"] = $this->read(Utils::readShort($this->read(2), false)); $this->pluginData["version"] = $this->read(Utils::readShort($this->read(2), false)); $this->pluginData["author"] = $this->read(Utils::readShort($this->read(2), false));