summaryrefslogtreecommitdiff
path: root/src/inventory.cpp
diff options
context:
space:
mode:
authorkwolekr <kwolekr@minetest.net>2013-03-27 23:27:16 -0400
committerkwolekr <kwolekr@minetest.net>2013-03-27 23:27:31 -0400
commitd01b74d00a39e38a898265adc0dbd3f15493cdc7 (patch)
treef2b16f4548518402dcbddd283b51b16b366a11fb /src/inventory.cpp
parenta782a88913649e1aecd0ebc51ee8a998175be226 (diff)
downloadminetest-d01b74d00a39e38a898265adc0dbd3f15493cdc7.tar.gz
minetest-d01b74d00a39e38a898265adc0dbd3f15493cdc7.tar.bz2
minetest-d01b74d00a39e38a898265adc0dbd3f15493cdc7.zip
Prevent infinite loop with invalid Inventory format
Diffstat (limited to 'src/inventory.cpp')
-rw-r--r--src/inventory.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inventory.cpp b/src/inventory.cpp
index 7051b611f..d6815d329 100644
--- a/src/inventory.cpp
+++ b/src/inventory.cpp
@@ -903,6 +903,10 @@ void Inventory::deSerialize(std::istream &is)
m_lists.push_back(list);
}
+ else
+ {
+ throw SerializationError("invalid inventory specifier");
+ }
}
}