From b11d2870bd825215b7c0cd9321809d6368dc7f04 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Thu, 13 Feb 2020 00:53:43 -0400 Subject: [PATCH] Fix verify pubkey initialization --- lokimq/lokimq.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lokimq/lokimq.cpp b/lokimq/lokimq.cpp index 89a2e87..c1d23e6 100644 --- a/lokimq/lokimq.cpp +++ b/lokimq/lokimq.cpp @@ -372,7 +372,7 @@ LokiMQ::LokiMQ( // Verify the pubkey. We could get by with taking just the privkey and just generate this // for ourselves, but this provides an extra check to make sure we and the caller agree // cryptographically (e.g. to make sure they don't pass us an ed25519 keypair by mistake) - std::string verify_pubkey{crypto_box_PUBLICKEYBYTES, 0}; + std::string verify_pubkey(crypto_box_PUBLICKEYBYTES, 0); crypto_scalarmult_base(reinterpret_cast(&verify_pubkey[0]), reinterpret_cast(&privkey[0])); if (verify_pubkey != pubkey) throw std::invalid_argument("Invalid pubkey/privkey values given to LokiMQ construction: pubkey verification failed");