From 555952e3d75bdba717534237d9b2aad50fe38d24 Mon Sep 17 00:00:00 2001
From: ulfvonbelow <strilen@tilde.club>
Date: Sun, 29 Jan 2023 06:10:49 -0600
Subject: [PATCH] RECLAIM: fix 1-byte overflow in DID_did_to_pkey.

Needs to be able to fit a null-terminator as well.
---
 src/reclaim/did_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/reclaim/did_helper.c b/src/reclaim/did_helper.c
index 5600b7440..17f3b21b2 100644
--- a/src/reclaim/did_helper.c
+++ b/src/reclaim/did_helper.c
@@ -78,7 +78,7 @@ DID_identity_to_did (struct GNUNET_IDENTITY_Ego *ego)
 enum GNUNET_GenericReturnValue
 DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey)
 {
-  char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH];
+  char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */
 
   if ((1 != (sscanf (did,
                      GNUNET_DID_METHOD_PREFIX "%"
-- 
2.38.1

