From 6e69bdb7ce01dcbc9d6be5f2da4555b270a1cefe Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 16 Apr 2018 13:09:30 +0200 Subject: [PATCH] fix hostname check --- src/namestore/gnunet-zoneimport.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/namestore/gnunet-zoneimport.c b/src/namestore/gnunet-zoneimport.c index 2af63dc3d..10d9cb4b6 100644 --- a/src/namestore/gnunet-zoneimport.c +++ b/src/namestore/gnunet-zoneimport.c @@ -1117,18 +1117,15 @@ queue (const char *hostname) return; } for (zone = zone_head; NULL != zone; zone = zone->next) - if ( (0 == strncmp (zone->domain, - hostname, - dot - hostname)) && - (strlen (zone->domain) == dot - hostname) ) + if (0 == strcmp (zone->domain, + dot + 1)) break; if (NULL == zone) { rejects++; GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Domain name `%.*s' not in ego list!\n", - (int) (dot - hostname), - hostname); + "Domain name `%s' not in ego list!\n", + dot + 1); return; } q.name = (char *) hostname; -- 2.25.1