diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-29 22:45:41 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-06-29 22:45:41 +0200 |
commit | 2b834d48aae35c5050895fac540ca55387925d0f (patch) | |
tree | cdda02a1680c3d920c69e2430bb142c95178686b | |
parent | 58bc3b65789a6c1216abb0dfb4f553b2a6b7f479 (diff) |
NAR parser: Fix missing name field check
Discovered by @Kloenk.
-rw-r--r-- | src/libutil/archive.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc index 6a8484705..51c88537e 100644 --- a/src/libutil/archive.cc +++ b/src/libutil/archive.cc @@ -262,7 +262,7 @@ static void parse(ParseSink & sink, Source & source, const Path & path) names[name] = 0; } } else if (s == "node") { - if (s.empty()) throw badArchive("entry name missing"); + if (name.empty()) throw badArchive("entry name missing"); parse(sink, source, path + "/" + name); } else throw badArchive("unknown field " + s); |