diff --git a/src/libutil/git.cc b/src/libutil/git.cc index af91fa643..7a9ac0bd8 100644 --- a/src/libutil/git.cc +++ b/src/libutil/git.cc @@ -33,7 +33,7 @@ std::optional decodeMode(RawMode m) { static std::string getStringUntil(Source & source, char byte) { std::string s; - char n[1]; + char n[1] = { 0 }; source(std::string_view { n, 1 }); while (*n != byte) { s += *n;