From d01b74d00a39e38a898265adc0dbd3f15493cdc7 Mon Sep 17 00:00:00 2001 From: kwolekr Date: Wed, 27 Mar 2013 23:27:16 -0400 Subject: [PATCH] Prevent infinite loop with invalid Inventory format --- src/inventory.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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"); + } } } -- 2.30.2