/pidgin/main: 3c4a36856de7: Fix for infinite loop when a chunked...

Eion Robb <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 3c4a36856de7983accf8456d4ba5590a9a2f079f
Author:	 Eion Robb <[email protected]>
Date:	 2016-02-09 05:40 +0000
Branch:	 EionRobb/httpc-edited-online-with-bitbucket-1454996408809
URL: https://hg.pidgin.im/pidgin/main/rev/3c4a36856de7

Description:

Fix for infinite loop when a chunked HTTP connection is terminated mid-chunk

diffstat:

 libpurple/http.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (14 lines):

diff --git a/libpurple/http.c b/libpurple/http.c
--- a/libpurple/http.c
+++ b/libpurple/http.c
@@ -1190,6 +1190,10 @@ static gboolean _purple_http_recv_loopbo
 		const gchar *redirect;
 
 		if (hc->is_chunked && !hc->chunks_done) {
+			if (len == 0) {
+				_purple_http_error(hc, _("Chunked connection terminated"));
+				return FALSE;
+			}
 			if (purple_debug_is_verbose()) {
 				purple_debug_misc("http",
 					"I need the terminating empty chunk\n");

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.