summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-05-09 18:39:13 +0200
committerworktycho <work.tycho@gmail.com>2014-05-09 18:39:13 +0200
commitc4cd201f184ab3a6212dd0d1fbb9e0e40e755352 (patch)
tree2bbe94932b94d64e231d3af8797f8d2981bb51eb /src
parentCheck the height and width values read. (diff)
downloadcuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar.gz
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar.bz2
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar.lz
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar.xz
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.tar.zst
cuberite-c4cd201f184ab3a6212dd0d1fbb9e0e40e755352.zip
Diffstat (limited to '')
-rw-r--r--src/WorldStorage/SchematicFileSerializer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/WorldStorage/SchematicFileSerializer.cpp b/src/WorldStorage/SchematicFileSerializer.cpp
index 9d594a084..115b2e869 100644
--- a/src/WorldStorage/SchematicFileSerializer.cpp
+++ b/src/WorldStorage/SchematicFileSerializer.cpp
@@ -192,7 +192,7 @@ bool cSchematicFileSerializer::LoadFromSchematicNBT(cBlockArea & a_BlockArea, cP
int SizeX = a_NBT.GetShort(TSizeX);
int SizeY = a_NBT.GetShort(TSizeY);
int SizeZ = a_NBT.GetShort(TSizeZ);
- if ((SizeX < 1) || (SizeY < 1) || (SizeZ < 1))
+ if ((SizeX < 1) || (SizeX > 65535) || (SizeY < 1) || (SizeY > 256) || (SizeZ < 1) || (SizeZ > 65535))
{
LOG("Dimensions are invalid in the schematic file: %d, %d, %d", SizeX, SizeY, SizeZ);
return false;