aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorulfvonbelow <strilen@tilde.club>2023-01-29 06:10:49 -0600
committerMartin Schanzenbach <schanzen@gnunet.org>2023-02-06 14:09:09 +0900
commit09ed5e00e0ead9ad8e382cd015a4c0c2146f6325 (patch)
tree3334ea0597a6f30f25a58f6dfe020952aba3712f
parent89dfff6d9b003c13eb6ebfad7be17140cd46a1b4 (diff)
downloadgnunet-09ed5e00e0ead9ad8e382cd015a4c0c2146f6325.tar.gz
gnunet-09ed5e00e0ead9ad8e382cd015a4c0c2146f6325.zip
RECLAIM: fix 1-byte overflow in DID_did_to_pkey.
Needs to be able to fit a null-terminator as well. Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
-rw-r--r--src/reclaim/did_helper.c2
1 files changed, 1 insertions, 1 deletions
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)
78enum GNUNET_GenericReturnValue 78enum GNUNET_GenericReturnValue
79DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey) 79DID_did_to_pkey (const char *did, struct GNUNET_IDENTITY_PublicKey *pkey)
80{ 80{
81 char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH]; 81 char pkey_str[MAX_DID_SPECIFIC_IDENTIFIER_LENGTH + 1]; /* 0-term */
82 82
83 if ((1 != (sscanf (did, 83 if ((1 != (sscanf (did,
84 GNUNET_DID_METHOD_PREFIX "%" 84 GNUNET_DID_METHOD_PREFIX "%"