Skip to content

Commit

Permalink
Fix Narinfo corruption detection bug
Browse files Browse the repository at this point in the history
The aim of this check was just to ensure each key occurs once.
  • Loading branch information
Ericson2314 committed Jul 2, 2020
1 parent 987a4a0 commit 058a156
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstore/nar-info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
else if (name == "Sig")
sigs.insert(value);
else if (name == "CA") {
if (!value.empty()) throw corrupt();
if (!ca.empty()) throw corrupt();
// FIXME: allow blank ca or require skipping field?
ca = parseContentAddressOpt(value);
}
Expand Down

0 comments on commit 058a156

Please sign in to comment.