gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12576 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r12576 - gnunet/src/transport
Date: Mon, 16 Aug 2010 16:17:19 +0200

Author: wachs
Date: 2010-08-16 16:17:19 +0200 (Mon, 16 Aug 2010)
New Revision: 12576

Modified:
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/plugin_transport_https.c
Log:
fixing bugs


Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2010-08-16 13:55:25 UTC 
(rev 12575)
+++ gnunet/src/transport/plugin_transport_http.c        2010-08-16 14:17:19 UTC 
(rev 12576)
@@ -799,7 +799,7 @@
 
   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 @@
       addr_len = sizeof(struct IPv6HttpAddress);
     }
 
+    GNUNET_assert (addr != NULL);
+    GNUNET_assert (addr_len != 0);
+
     ps = NULL;
     /* only inbound sessions here */
 

Modified: gnunet/src/transport/plugin_transport_https.c
===================================================================
--- gnunet/src/transport/plugin_transport_https.c       2010-08-16 13:55:25 UTC 
(rev 12575)
+++ gnunet/src/transport/plugin_transport_https.c       2010-08-16 14:17:19 UTC 
(rev 12576)
@@ -892,6 +892,9 @@
       addr_len = sizeof(struct IPv6HttpAddress);
     }
 
+    GNUNET_assert (addr != NULL);
+    GNUNET_assert (addr_len != 0);
+
     ps = NULL;
     /* only inbound sessions here */
 
@@ -2271,7 +2274,7 @@
 
   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)
   {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]