From: Matthias Wachs Date: Mon, 16 Aug 2010 14:17:19 +0000 (+0000) Subject: fixing bugs X-Git-Tag: initial-import-from-subversion-38251~20679 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c317be1af381424a536047d11cb6ee93b9812e07;p=oweals%2Fgnunet.git fixing bugs --- diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index fe43ca0d8..64ef8849b 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -799,7 +799,7 @@ mdh_access_cb (void *cls, int res = GNUNET_NO; int send_error_to_client; - void * addr; + void * addr = NULL; size_t addr_len = 0 ; GNUNET_assert(cls !=NULL); @@ -883,6 +883,9 @@ mdh_access_cb (void *cls, addr_len = sizeof(struct IPv6HttpAddress); } + GNUNET_assert (addr != NULL); + GNUNET_assert (addr_len != 0); + ps = NULL; /* only inbound sessions here */ diff --git a/src/transport/plugin_transport_https.c b/src/transport/plugin_transport_https.c index aa25d7ac4..1d90c77f1 100644 --- a/src/transport/plugin_transport_https.c +++ b/src/transport/plugin_transport_https.c @@ -892,6 +892,9 @@ mdh_access_cb (void *cls, addr_len = sizeof(struct IPv6HttpAddress); } + GNUNET_assert (addr != NULL); + GNUNET_assert (addr_len != 0); + ps = NULL; /* only inbound sessions here */ @@ -2271,7 +2274,7 @@ load_certificate( const char * file ) if (0!=STAT(file, &fstat)) return NULL; - text = GNUNET_malloc (fstat.st_size); + text = GNUNET_malloc (fstat.st_size+1); gn_file = GNUNET_DISK_file_open(file,GNUNET_DISK_OPEN_READ, GNUNET_DISK_PERM_USER_READ); if (gn_file==NULL) {