about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorWill Fancher <elvishjerricco@gmail.com>2018-09-26T01·19-0400
committerWill Fancher <elvishjerricco@gmail.com>2018-09-26T01·19-0400
commit0ae8d4033d0b140b98e45c57e25b23d1970d356c (patch)
treec37a151ed5008a728ddc78a33746df729ddfd9e9 /src
parent8327a7a8fa0ce6f6b1d1e0ea1324d053a031e438 (diff)
Fix overflow when verifying signatures of content addressable paths
Diffstat (limited to 'src')
-rw-r--r--src/nix/verify.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc
index 6540208a8a2c..7ef571561a0e 100644
--- a/src/nix/verify.cc
+++ b/src/nix/verify.cc
@@ -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++;
                             }
                         };