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 case insensitivity


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix case insensitivity
Date: Thu, 09 Aug 2018 12:58:52 +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 8f6ad409f fix case insensitivity
8f6ad409f is described below

commit 8f6ad409fd2c25119453eab7b741428584fa8f80
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Thu Aug 9 12:58:48 2018 +0200

    fix case insensitivity
---
 src/reclaim-attribute/reclaim_attribute.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/reclaim-attribute/reclaim_attribute.c 
b/src/reclaim-attribute/reclaim_attribute.c
index 74d668ea8..1ffa9618f 100644
--- a/src/reclaim-attribute/reclaim_attribute.c
+++ b/src/reclaim-attribute/reclaim_attribute.c
@@ -218,23 +218,27 @@ GNUNET_RECLAIM_ATTRIBUTE_claim_new (const char* attr_name,
 {
   struct GNUNET_RECLAIM_ATTRIBUTE_Claim *attr;
   char *write_ptr;
+  char *attr_name_tmp = GNUNET_strdup (attr_name);
+
+  GNUNET_STRINGS_utf8_tolower (attr_name, attr_name_tmp);
 
   attr = GNUNET_malloc (sizeof (struct GNUNET_RECLAIM_ATTRIBUTE_Claim) +
-                        strlen (attr_name) + 1 +
+                        strlen (attr_name_tmp) + 1 +
                         data_size);
   attr->type = type;
   attr->data_size = data_size;
   attr->version = 0;
   write_ptr = (char*)&attr[1];
   GNUNET_memcpy (write_ptr,
-                 attr_name,
-                 strlen (attr_name) + 1);
+                 attr_name_tmp,
+                 strlen (attr_name_tmp) + 1);
   attr->name = write_ptr;
   write_ptr += strlen (attr->name) + 1;
   GNUNET_memcpy (write_ptr,
                  data,
                  data_size);
   attr->data = write_ptr;
+  GNUNET_free (attr_name_tmp);
   return attr;
 }
 

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



reply via email to

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