fix
authorChristian Grothoff <christian@grothoff.org>
Fri, 16 Apr 2010 18:50:45 +0000 (18:50 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 16 Apr 2010 18:50:45 +0000 (18:50 +0000)
src/hostlist/hostlist-client.c

index 181f9da14ccc573d4e2af3d663b1a53cb7a50af2..88b28a4a8228588a47b756e51caaf4ef3d573830 100644 (file)
@@ -386,6 +386,8 @@ get_list_url ()
     use_preconfigured_list = GNUNET_NO;
     return get_bootstrap_url();
   }
+  if (linked_list_size == 0)
+    return NULL;
   index = GNUNET_CRYPTO_random_u32 ( GNUNET_CRYPTO_QUALITY_WEAK, linked_list_size);
   counter = 0;
   pos = linked_list_head;