changeset 32279:b6955681b7b3

Fix incorrect handling of HTTP 100 responses when using the HTTP connection method. This can lead to a crash. (Discovered by Marius Wachtler)
author Mark Doliner <mark@kingant.net>
date Thu, 18 Aug 2011 08:45:22 +0000
parents d2eb28c12d44
children 7963daba699d
files ChangeLog libpurple/protocols/msn/httpconn.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Aug 18 08:41:24 2011 +0000
+++ b/ChangeLog	Thu Aug 18 08:45:22 2011 +0000
@@ -41,6 +41,9 @@
 	* Fix crash when NAMES is empty. (James McLaughlin) (#14518)
 
 	MSN:
+	* Fix incorrect handling of HTTP 100 responses when using the HTTP
+	  connection method.  This can lead to a crash. (Discovered by Marius
+	  Wachtler)
 	* Fix seemingly random crashing. (#14307)
 	* Fix a crash when the account is disconnected at the time we are doing a
 	  SB request. (Hanzz, ported by shlomif) (#12431)
--- a/libpurple/protocols/msn/httpconn.c	Thu Aug 18 08:41:24 2011 +0000
+++ b/libpurple/protocols/msn/httpconn.c	Thu Aug 18 08:45:22 2011 +0000
@@ -111,8 +111,8 @@
 			return TRUE;
 		}
 
+		size -= (s - buf);
 		buf = s;
-		size -= (s - buf);
 	}
 
 	if ((s = strstr(buf, "\r\n\r\n")) == NULL)