From dd9197c9d5cd240ae24ad786427d9860c2e25102 Mon Sep 17 00:00:00 2001 From: Peter Conrad Date: Mon, 12 Mar 2018 15:06:17 +0100 Subject: [PATCH] Added missing depth check --- include/fc/variant.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/fc/variant.hpp b/include/fc/variant.hpp index 48de3af..7dc453a 100644 --- a/include/fc/variant.hpp +++ b/include/fc/variant.hpp @@ -640,6 +640,7 @@ namespace fc template void from_variant( const variant& v, boost::multi_index_container& c, uint32_t max_depth ) { + _FC_ASSERT( max_depth > 0, "Recursion depth exceeded!" ); const variants& vars = v.get_array(); c.clear(); for( const auto& item : vars )