gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix corruption


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix corruption
Date: Sat, 27 Apr 2019 09:22:14 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new fcad7dd85 fix corruption
fcad7dd85 is described below

commit fcad7dd854dd485bc992e6d29408b5b1f27907d5
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Sat Apr 27 09:22:00 2019 +0200

    fix corruption
---
 src/reclaim/oidc_helper.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index 11641e166..7b4d8ee37 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -325,6 +325,9 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
   if (NULL != attrs)
   {
     attr_list_len = GNUNET_RECLAIM_ATTRIBUTE_list_serialize_get_size (attrs);
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+                "Length of serialized attributes: %lu\n",
+                attr_list_len);
     signature_payload_len += attr_list_len;
     attrs_ser = GNUNET_malloc (attr_list_len);
     GNUNET_RECLAIM_ATTRIBUTE_list_serialize (attrs, attrs_ser);
@@ -332,7 +335,11 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
   code_payload_len = sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
                      signature_payload_len +
                      sizeof (struct GNUNET_CRYPTO_EcdsaSignature);
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+              "Length of data to encode: %lu\n",
+              code_payload_len);
   code_payload = GNUNET_malloc (code_payload_len);
+  GNUNET_assert (NULL != code_payload);
   purpose = (struct GNUNET_CRYPTO_EccSignaturePurpose *) code_payload;
   purpose->size = htonl (sizeof (struct GNUNET_CRYPTO_EccSignaturePurpose) +
                          signature_payload_len);
@@ -375,7 +382,7 @@ OIDC_build_authz_code (const struct 
GNUNET_CRYPTO_EcdsaPrivateKey *issuer,
     GNUNET_free_non_null (attrs_ser);
     return NULL;
   }
-  code_str = base64_encode ((const char *) &code_payload, code_payload_len);
+  code_str = base64_encode (code_payload, code_payload_len);
   GNUNET_free (code_payload);
   GNUNET_free_non_null (attrs_ser);
   return code_str;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]