Merge pull request #5599 from fzakaria/faridzakaria/fix-progress-bar-leak

Fix heap use after free in progress-bar.cc
This commit is contained in:
Théophane Hufschmitt 2021-12-01 16:28:38 +01:00 committed by GitHub
commit f3f32f0c30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@
namespace nix { 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(n < fields.size());
assert(fields[n].type == Logger::Field::tString); assert(fields[n].type == Logger::Field::tString);