pidgin: 7743dd71: Apparently there might be stuff after th...

nosnilmot at pidgin.im nosnilmot at pidgin.im
Fri Jul 3 21:20:28 EDT 2009


-----------------------------------------------------------------
Revision: 7743dd71673c71e91039e890a3a939f9850f2d16
Ancestor: c1a33238c9242ec1d3bc51e941adada7ad60ff54
Author: nosnilmot at pidgin.im
Date: 2009-07-04T01:17:55
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/7743dd71673c71e91039e890a3a939f9850f2d16

Modified files:
        libpurple/util.c

ChangeLog: 

Apparently there might be stuff after the semicolon before the \r\n so just
check that there really is a \r\n later on instead.

-------------- next part --------------
============================================================
--- libpurple/util.c	908a3adc318a03c75205b97c88cce616b6c81c17
+++ libpurple/util.c	6c524ce7e757adfc40e5090e94e18a5a759552c7
@@ -3814,7 +3814,10 @@ process_chunked_data(char *data, gsize *
 		}
 
 		/* Advance to the start of the data */
-		s = strstr(s, "\r\n") + 2;
+		s = strstr(s, "\r\n");
+		if (s == NULL)
+			break;
+		s += 2;
 
 		if (s + sz > data + *len) {
 			purple_debug_error("util", "Error processing chunked data: "


More information about the Commits mailing list