From 684df5daf98dfe98b7e5faeefea8bee589a268a4 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Sun, 6 Oct 2019 04:32:15 +0200 Subject: [PATCH] save nick 0-term byte --- src/gns/gnunet-service-gns_resolver.c | 6 ------ src/gns/plugin_gnsrecord_gns.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 41b04e1ae..52d850064 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -2165,12 +2165,6 @@ handle_gns_resolution_result (void *cls, const char *nick; nick = rd[i].data; - if ((rd[i].data_size > 0) && - (nick[rd[i].data_size - 1] != '\0')) - { - GNUNET_break_op (0); - break; - } break; } diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c index 3ea282fdf..e0bc4fb0c 100644 --- a/src/gns/plugin_gnsrecord_gns.c +++ b/src/gns/plugin_gnsrecord_gns.c @@ -175,7 +175,7 @@ gns_string_to_value (void *cls, case GNUNET_GNSRECORD_TYPE_NICK: *data = GNUNET_strdup (s); - *data_size = strlen (s) + 1; //Store 0-terminator + *data_size = strlen (s); return GNUNET_OK; case GNUNET_GNSRECORD_TYPE_LEHO: -- 2.25.1