From f7031640f16ac459d6be5c8c055d37fb7d9a6a9d Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Thu, 12 Jul 2012 16:23:42 +0000 Subject: -fix --- src/gns/gnunet-gns-proxy.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c index eeef1a8a2..e544a7867 100644 --- a/src/gns/gnunet-gns-proxy.c +++ b/src/gns/gnunet-gns-proxy.c @@ -884,6 +884,7 @@ mhd_content_cb (void *cls, memmove (ctask->buffer, ctask->buffer_read_ptr, bytes_to_copy); ctask->buffer_read_ptr = ctask->buffer; ctask->buffer_write_ptr = ctask->buffer + bytes_to_copy; + ctask->buffer[bytes_to_copy] = '\0'; } if (bytes_to_copy+copied > max) @@ -1068,6 +1069,7 @@ curl_download_cb (void *ptr, size_t size, size_t nmemb, void* ctx) memcpy (ctask->buffer_write_ptr, cbuf, total); ctask->bytes_in_buffer += total; ctask->buffer_write_ptr += total; + ctask->buffer_write_ptr[0] = '\0'; //run_mhd_now (ctask->mhd); return total; -- cgit v1.2.3