gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] 148/171: -fix


From: gnunet
Subject: [GNUnet-SVN] [gnunet] 148/171: -fix
Date: Thu, 04 Jan 2018 16:10:56 +0100

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

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

commit c3075f1807d794ab1fb8af4779a07f3f528ce84e
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Thu Oct 12 15:12:42 2017 +0200

    -fix
---
 src/identity-provider/gnunet-idp.c                    | 2 +-
 src/identity-provider/plugin_rest_identity_provider.c | 8 +++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/identity-provider/gnunet-idp.c 
b/src/identity-provider/gnunet-idp.c
index 0efe6eaa9..88136c124 100644
--- a/src/identity-provider/gnunet-idp.c
+++ b/src/identity-provider/gnunet-idp.c
@@ -247,7 +247,7 @@ iter_finished (void *cls)
   attr = GNUNET_IDENTITY_PROVIDER_attribute_new (attr_name,
                                                  
GNUNET_IDENTITY_PROVIDER_AT_STRING,
                                                  attr_value,
-                                                 strlen (attr_value));
+                                                 strlen (attr_value) + 1);
   idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (idp_handle,
                                                      pkey,
                                                      attr,
diff --git a/src/identity-provider/plugin_rest_identity_provider.c 
b/src/identity-provider/plugin_rest_identity_provider.c
index b6a8f3d36..f6039722f 100644
--- a/src/identity-provider/plugin_rest_identity_provider.c
+++ b/src/identity-provider/plugin_rest_identity_provider.c
@@ -599,7 +599,7 @@ add_attribute_cont (struct GNUNET_REST_RequestHandle 
*con_handle,
   attribute = GNUNET_IDENTITY_PROVIDER_attribute_new (name_str,
                                                       
GNUNET_IDENTITY_PROVIDER_AT_STRING,
                                                       value_str,
-                                                      strlen (value_str));
+                                                      strlen (value_str) + 1);
   handle->idp = GNUNET_IDENTITY_PROVIDER_connect (cfg);
   handle->idp_op = GNUNET_IDENTITY_PROVIDER_attribute_store (handle->idp,
                                                              identity_priv,
@@ -624,6 +624,12 @@ attr_collect (void *cls,
   struct GNUNET_JSONAPI_Resource *json_resource;
   struct RequestHandle *handle = cls;
   json_t *value;
+  
+  if ((NULL == attr->name) || (NULL == attr->data))
+  {
+    GNUNET_IDENTITY_PROVIDER_get_attributes_next (handle->attr_it);
+    return;
+  }
 
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Adding attribute: %s\n",
               attr->name);

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



reply via email to

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