From bc1152ede55168055fdade1ed8b0bbf3320d8e95 Mon Sep 17 00:00:00 2001 From: sowle Date: Mon, 17 Feb 2020 16:44:11 +0300 Subject: [PATCH] check return value of do_serialize in get_attachment_extra_info_details() --- src/currency_core/currency_format_utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/currency_core/currency_format_utils.cpp b/src/currency_core/currency_format_utils.cpp index 7c75dc10..781d9360 100644 --- a/src/currency_core/currency_format_utils.cpp +++ b/src/currency_core/currency_format_utils.cpp @@ -625,7 +625,8 @@ namespace currency //put hash into extra std::stringstream ss; binary_archive oar(ss); - ::do_serialize(oar, const_cast&>(attachment)); + if (!::do_serialize(oar, const_cast&>(attachment))) + return; std::string buff = ss.str(); eai.sz = buff.size(); eai.hsh = get_blob_hash(buff);