From 0602496cb6cedc917abbd0a12468e9329c6967e1 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Thu, 25 May 2006 13:22:06 +0200 Subject: Better handling of completely empty HTTP replies in http_client.c. --- protocols/http_client.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'protocols/http_client.c') diff --git a/protocols/http_client.c b/protocols/http_client.c index 5db31782..e181438c 100644 --- a/protocols/http_client.c +++ b/protocols/http_client.c @@ -239,6 +239,11 @@ static void http_incoming_data( gpointer data, int source, GaimInputCondition co return; got_reply: + /* Maybe if the webserver is overloaded, or when there's bad SSL + support... */ + if( req->bytes_read == 0 ) + goto cleanup; + /* Zero termination is very convenient. */ req->reply_headers[req->bytes_read] = 0; -- cgit v1.2.3