aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ftutil.c2
-rw-r--r--lib/http_client.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/ftutil.c b/lib/ftutil.c
index 71c09b50..3b29d2f4 100644
--- a/lib/ftutil.c
+++ b/lib/ftutil.c
@@ -137,7 +137,7 @@ int ft_listen( struct sockaddr_storage *saddr_ptr, char *host, char *port, int c
memcpy( saddr_ptr, saddr, saddrlen );
/* I hate static-length strings.. */
- host[HOST_NAME_MAX] = '\0';
+ host[HOST_NAME_MAX-1] = '\0';
port[5] = '\0';
return fd;
diff --git a/lib/http_client.c b/lib/http_client.c
index 18c393f8..590b8143 100644
--- a/lib/http_client.c
+++ b/lib/http_client.c
@@ -210,7 +210,10 @@ static gboolean http_incoming_data( gpointer data, int source, b_input_condition
int st;
if( req->inpa > 0 )
+ {
b_event_remove( req->inpa );
+ req->inpa = 0;
+ }
if( req->ssl )
{