diff --git a/generator.cpp b/generator.cpp index de51f1b..2780e93 100644 --- a/generator.cpp +++ b/generator.cpp @@ -163,6 +163,8 @@ auto Generator::generate_random_data(uint n) -> std::string { std::string nu_G_k{generate_blocks(2)}; // fmt::print("nu_G_k: {}\n", nu_G_k); // debugging std::string dst; + // FIXME: +1 for the actual null-termination, not exactly sure if needed + dst.resize(G.k_length + 1); CryptoPP::StringSource str_s( nu_G_k,true,new CryptoPP::HexDecoder(new CryptoPP::StringSink(dst)) );