From 92bc3e9a534f2960d584b5e6698c7122a9ee2f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Sat, 25 Jun 2022 22:17:59 +0200 Subject: Test: guard attach code match --- src/pairing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pairing.cpp b/src/pairing.cpp index e1e04cc..91e0b0f 100644 --- a/src/pairing.cpp +++ b/src/pairing.cpp @@ -204,8 +204,8 @@ string PairingServiceBase::confirmationNumber(const vector & digest) { uint32_t confirm; memcpy(&confirm, digest.data(), sizeof(confirm)); - string ret(7, '\0'); - snprintf(ret.data(), ret.size(), "%06d", ntohl(confirm) % 1000000); + string ret(6, '\0'); + snprintf(ret.data(), ret.size() + 1, "%06d", ntohl(confirm) % 1000000); return ret; } -- cgit v1.2.3