From: Christian Grothoff Date: Mon, 12 Apr 2010 11:35:33 +0000 (+0000) Subject: fix X-Git-Tag: initial-import-from-subversion-38251~22197 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=067ee57a0f13c5813af7942ac6081af692f87e5e;p=oweals%2Fgnunet.git fix --- diff --git a/src/hostlist/hostlist-client.c b/src/hostlist/hostlist-client.c index 3824972d8..b63644b41 100644 --- a/src/hostlist/hostlist-client.c +++ b/src/hostlist/hostlist-client.c @@ -151,11 +151,10 @@ download_hostlist_processor (void *ptr, while ( (left > 0) || (download_pos > 0) ) { - cpy = GNUNET_MIN (total, GNUNET_SERVER_MAX_MESSAGE_SIZE - download_pos); - GNUNET_assert (cpy > 0); + cpy = GNUNET_MIN (left, GNUNET_SERVER_MAX_MESSAGE_SIZE - download_pos); memcpy (&download_buffer[download_pos], cbuf, - cpy); + cpy); cbuf += cpy; download_pos += cpy; left -= cpy; diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index 6b3526926..2d0210cab 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c @@ -206,6 +206,8 @@ host_processor (void *cls, finish_response (results); return; } + if (hello == NULL) + return; has_addr = GNUNET_NO; GNUNET_HELLO_iterate_addresses (hello, GNUNET_NO,