]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
PKCS11 Signer: Fix buffer overflow
authorFred Morcos <fred.morcos@open-xchange.com>
Wed, 22 Feb 2023 11:49:27 +0000 (12:49 +0100)
committerFred Morcos <fred.morcos@open-xchange.com>
Wed, 22 Feb 2023 11:50:07 +0000 (12:50 +0100)
pdns/pkcs11signers.cc

index e57018a43e043cb431947dcce9fcf26f9cfa9b59..77ebfe16ef599fffb3d5585b5fa88430bbb027e4 100644 (file)
@@ -424,7 +424,7 @@ class Pkcs11Token {
 
       size_t k;
       auto pubAttr = std::make_unique<CK_ATTRIBUTE[]>(pubAttributes.size());
-      auto privAttr = std::make_unique<CK_ATTRIBUTE[]>(pubAttributes.size());
+      auto privAttr = std::make_unique<CK_ATTRIBUTE[]>(privAttributes.size());
 
       k = 0;
       for(P11KitAttribute& attribute :  pubAttributes) {