From 5378dabdecccd3158f9bb317499ece365563650b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 17 Nov 2019 09:50:18 +1100 Subject: [PATCH] Fix String::resize not zero-terminating --- src/string.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/string.cc b/src/string.cc index d44963ba..b5f04f29 100644 --- a/src/string.cc +++ b/src/string.cc @@ -147,6 +147,7 @@ void String::resize(ByteCount size, char c) for (auto i = current_size; i < target_size; ++i) m_data.data()[i] = c; } + data()[target_size] = 0; } void String::Data::set_size(size_t size)