From: kwolekr Date: Thu, 28 Mar 2013 03:27:16 +0000 (-0400) Subject: Prevent infinite loop with invalid Inventory format X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=d01b74d00a39e38a898265adc0dbd3f15493cdc7;p=zefram%2Fminetest%2Fminetest_engine.git Prevent infinite loop with invalid Inventory format --- diff --git a/src/inventory.cpp b/src/inventory.cpp index 7051b611..d6815d32 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"); + } } }