From bc355087f2eae41aff6c8b83e5c6cf1b3ff70966 Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 26 Mar 2012 08:37:19 +0000 Subject: [PATCH] -fix --- src/gns/gnunet-service-gns.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gns/gnunet-service-gns.c b/src/gns/gnunet-service-gns.c index 6acd2285c..2bd98fc10 100644 --- a/src/gns/gnunet-service-gns.c +++ b/src/gns/gnunet-service-gns.c @@ -469,6 +469,7 @@ static void handle_shorten(void *cls, size_t msg_size = 0; struct ClientShortenHandle *csh; char name[MAX_DNS_NAME_LENGTH]; + char* nameptr = name; if (ntohs (message->size) < sizeof (struct GNUNET_GNS_ClientShortenMessage)) { @@ -495,7 +496,7 @@ static void handle_shorten(void *cls, csh->client = client; csh->unique_id = sh_msg->id; - normalize_name((char*)&sh_msg[1], (char**)&name); + normalize_name((char*)&sh_msg[1], &nameptr); if (strlen (name) < strlen(GNUNET_GNS_TLD)) { csh->name = NULL; @@ -584,6 +585,7 @@ static void handle_get_authority(void *cls, size_t msg_size = 0; struct ClientGetAuthHandle *cah; char name[MAX_DNS_NAME_LENGTH]; + char* nameptr = name; if (ntohs (message->size) < sizeof (struct GNUNET_GNS_ClientGetAuthMessage)) { @@ -606,7 +608,7 @@ static void handle_get_authority(void *cls, return; } - normalize_name((char*)&sh_msg[1], (char**)&name); + normalize_name((char*)&sh_msg[1], &nameptr); cah = GNUNET_malloc(sizeof(struct ClientGetAuthHandle)); @@ -713,6 +715,7 @@ handle_lookup(void *cls, size_t namelen; char name[MAX_DNS_NAME_LENGTH]; struct ClientLookupHandle *clh; + char* nameptr = name; if (ntohs (message->size) < sizeof (struct GNUNET_GNS_ClientLookupMessage)) { @@ -735,7 +738,7 @@ handle_lookup(void *cls, return; } - normalize_name((char*)&sh_msg[1], (char**)&name); + normalize_name((char*)&sh_msg[1], &nameptr); namelen = strlen(name)+1; clh = GNUNET_malloc(sizeof(struct ClientLookupHandle)); clh->client = client; -- 2.25.1