From: kwolekr Date: Thu, 28 Mar 2013 03:27:16 +0000 (-0400) Subject: Prevent infinite loop with invalid Inventory format X-Git-Tag: 0.4.6~22^2~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d01b74d00a39e38a898265adc0dbd3f15493cdc7;p=oweals%2Fminetest.git Prevent infinite loop with invalid Inventory format --- 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"); + } } }