1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Merge pull request #2452 from ElvishJerricco/verify-sigs-overflow

Fix overflow when verifying signatures of content addressable paths
This commit is contained in:
Eelco Dolstra 2018-10-08 12:03:03 +02:00 committed by GitHub
commit 01bd66bf83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -120,7 +120,7 @@ struct CmdVerify : StorePathsCommand
for (auto sig : sigs) {
if (sigsSeen.count(sig)) continue;
sigsSeen.insert(sig);
if (info->checkSignature(publicKeys, sig))
if (validSigs < ValidPathInfo::maxSigs && info->checkSignature(publicKeys, sig))
validSigs++;
}
};