aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFarid Zakaria <farid.m.zakaria@gmail.com>2021-11-18 14:54:50 -0800
committerFarid Zakaria <farid.m.zakaria@gmail.com>2021-11-23 08:34:55 -0800
commitd41af23a6c879fe2b5f88e40e0ad87db099a23cf (patch)
tree57a2327fd1462dce3f91fdb3432b161b66979a1b
parentf836e3e2ce8fc4e76ceffdc21ce76a8f0c120dc2 (diff)
Fix heap use after free in progress-bar.cc
Fix some heap-use-after-free in progress-bar.cc These are somewhat tricky failures here due to temporary variable creation and string_view
-rw-r--r--src/libmain/progress-bar.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc
index 63955eed1..f4306ab91 100644
--- a/src/libmain/progress-bar.cc
+++ b/src/libmain/progress-bar.cc
@@ -11,7 +11,7 @@
namespace nix {
-static std::string getS(const std::vector<Logger::Field> & fields, size_t n)
+static std::string_view getS(const std::vector<Logger::Field> & fields, size_t n)
{
assert(n < fields.size());
assert(fields[n].type == Logger::Field::tString);