aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-04-16 13:09:30 +0200
committerChristian Grothoff <christian@grothoff.org>2018-04-16 13:09:30 +0200
commit6e69bdb7ce01dcbc9d6be5f2da4555b270a1cefe (patch)
tree6b36f245499e76a555d4cd0ce0210f1ed4c17f7c /src
parent98c02969dbb2bca8ec4aff79f57b8a3e349ed01a (diff)
downloadgnunet-6e69bdb7ce01dcbc9d6be5f2da4555b270a1cefe.tar.gz
gnunet-6e69bdb7ce01dcbc9d6be5f2da4555b270a1cefe.zip
fix hostname check
Diffstat (limited to 'src')
-rw-r--r--src/namestore/gnunet-zoneimport.c11
1 files 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)
1117 return; 1117 return;
1118 } 1118 }
1119 for (zone = zone_head; NULL != zone; zone = zone->next) 1119 for (zone = zone_head; NULL != zone; zone = zone->next)
1120 if ( (0 == strncmp (zone->domain, 1120 if (0 == strcmp (zone->domain,
1121 hostname, 1121 dot + 1))
1122 dot - hostname)) &&
1123 (strlen (zone->domain) == dot - hostname) )
1124 break; 1122 break;
1125 if (NULL == zone) 1123 if (NULL == zone)
1126 { 1124 {
1127 rejects++; 1125 rejects++;
1128 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1126 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
1129 "Domain name `%.*s' not in ego list!\n", 1127 "Domain name `%s' not in ego list!\n",
1130 (int) (dot - hostname), 1128 dot + 1);
1131 hostname);
1132 return; 1129 return;
1133 } 1130 }
1134 q.name = (char *) hostname; 1131 q.name = (char *) hostname;