diff --git a/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp b/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp index 8ca3e9dbff..93a23cad52 100644 --- a/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp +++ b/include/bitcoin/system/impl/stream/streamers/byte_reader.ipp @@ -277,7 +277,7 @@ data_chunk byte_reader::read_bytes() NOEXCEPT return {}; // This will always produce at least one (zero) terminating byte. - data_chunk out; + data_chunk out{}; while (valid()) out.push_back(read_byte()); @@ -325,7 +325,7 @@ std::string byte_reader::read_string_buffer(size_t size) NOEXCEPT return {}; // This will produce one (zero) terminating byte if size exceeds available. - std::string out; + std::string out{}; out.reserve(add1(size)); while (!is_zero(size--) && valid()) out.push_back(read_byte());