diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2010-08-16 14:17:19 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2010-08-16 14:17:19 +0000 |
commit | c317be1af381424a536047d11cb6ee93b9812e07 (patch) | |
tree | 796645f5006e2f9ee62fda290d36e283955116f7 /src/transport | |
parent | 5d388f7bb97dc868622b097c589a24e298bf14fa (diff) | |
download | gnunet-c317be1af381424a536047d11cb6ee93b9812e07.tar.gz gnunet-c317be1af381424a536047d11cb6ee93b9812e07.zip |
fixing bugs
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/plugin_transport_http.c | 5 | ||||
-rw-r--r-- | src/transport/plugin_transport_https.c | 5 |
2 files changed, 8 insertions, 2 deletions
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, | |||
799 | 799 | ||
800 | int res = GNUNET_NO; | 800 | int res = GNUNET_NO; |
801 | int send_error_to_client; | 801 | int send_error_to_client; |
802 | void * addr; | 802 | void * addr = NULL; |
803 | size_t addr_len = 0 ; | 803 | size_t addr_len = 0 ; |
804 | 804 | ||
805 | GNUNET_assert(cls !=NULL); | 805 | GNUNET_assert(cls !=NULL); |
@@ -883,6 +883,9 @@ mdh_access_cb (void *cls, | |||
883 | addr_len = sizeof(struct IPv6HttpAddress); | 883 | addr_len = sizeof(struct IPv6HttpAddress); |
884 | } | 884 | } |
885 | 885 | ||
886 | GNUNET_assert (addr != NULL); | ||
887 | GNUNET_assert (addr_len != 0); | ||
888 | |||
886 | ps = NULL; | 889 | ps = NULL; |
887 | /* only inbound sessions here */ | 890 | /* only inbound sessions here */ |
888 | 891 | ||
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, | |||
892 | addr_len = sizeof(struct IPv6HttpAddress); | 892 | addr_len = sizeof(struct IPv6HttpAddress); |
893 | } | 893 | } |
894 | 894 | ||
895 | GNUNET_assert (addr != NULL); | ||
896 | GNUNET_assert (addr_len != 0); | ||
897 | |||
895 | ps = NULL; | 898 | ps = NULL; |
896 | /* only inbound sessions here */ | 899 | /* only inbound sessions here */ |
897 | 900 | ||
@@ -2271,7 +2274,7 @@ load_certificate( const char * file ) | |||
2271 | 2274 | ||
2272 | if (0!=STAT(file, &fstat)) | 2275 | if (0!=STAT(file, &fstat)) |
2273 | return NULL; | 2276 | return NULL; |
2274 | text = GNUNET_malloc (fstat.st_size); | 2277 | text = GNUNET_malloc (fstat.st_size+1); |
2275 | gn_file = GNUNET_DISK_file_open(file,GNUNET_DISK_OPEN_READ, GNUNET_DISK_PERM_USER_READ); | 2278 | gn_file = GNUNET_DISK_file_open(file,GNUNET_DISK_OPEN_READ, GNUNET_DISK_PERM_USER_READ); |
2276 | if (gn_file==NULL) | 2279 | if (gn_file==NULL) |
2277 | { | 2280 | { |