From 64da0983d5fa5042e45da738b6d5dcda38331b8a Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 7 Jan 2017 16:05:02 +0000 Subject: [PATCH] core: don't try to deserialize an empty extra to remove a field --- src/cryptonote_core/cryptonote_format_utils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index b5f2b069..e04409d8 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -371,6 +371,8 @@ namespace cryptonote //--------------------------------------------------------------- bool remove_field_from_tx_extra(std::vector& tx_extra, const std::type_info &type) { + if (tx_extra.empty()) + return true; std::string extra_str(reinterpret_cast(tx_extra.data()), tx_extra.size()); std::istringstream iss(extra_str); binary_archive ar(iss);