Prevent infinite loop with invalid Inventory format
authorkwolekr <kwolekr@minetest.net>
Thu, 28 Mar 2013 03:27:16 +0000 (23:27 -0400)
committerkwolekr <kwolekr@minetest.net>
Thu, 28 Mar 2013 03:27:31 +0000 (23:27 -0400)
src/inventory.cpp

index 7051b611fe014f4c28996a35a7645b7b133b322d..d6815d32903258831c0088c1c12be4117eb1fff4 100644 (file)
@@ -903,6 +903,10 @@ void Inventory::deSerialize(std::istream &is)
 
                        m_lists.push_back(list);
                }
+               else
+               {
+                       throw SerializationError("invalid inventory specifier");
+               }
        }
 }