mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 16:52:27 +00:00
NAR parser: Fix missing name field check
Discovered by @Kloenk.
(cherry picked from commit 2b834d48aa
)
This commit is contained in:
parent
96310a4d7d
commit
3933cf56af
@ -261,7 +261,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);
|
||||
|
Loading…
Reference in New Issue
Block a user