changeset 23057:d04d24b1db9b

MSN SLP fix
author Richard Laager <rlaager@wiktel.com>
date Thu, 26 Jun 2008 08:42:49 +0000
parents d74ff4f23171
children a94f472c7635 5c70d953a497
files libpurple/protocols/msn/slplink.c libpurple/protocols/msnp9/slplink.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Thu Jun 26 01:18:05 2008 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Jun 26 08:42:49 2008 +0000
@@ -593,7 +593,7 @@
 	}
 	else if (slpmsg->size)
 	{
-		if ((offset + len) > slpmsg->size)
+		if (offset < 0 || (offset + len) > slpmsg->size)
 		{
 			purple_debug_error("msn",
 				"Oversized slpmsg - msgsize=%lld offset=%" G_GSIZE_FORMAT " len=%" G_GSIZE_FORMAT "\n",
--- a/libpurple/protocols/msnp9/slplink.c	Thu Jun 26 01:18:05 2008 +0000
+++ b/libpurple/protocols/msnp9/slplink.c	Thu Jun 26 08:42:49 2008 +0000
@@ -597,7 +597,7 @@
 	}
 	else if (slpmsg->size)
 	{
-		if ((offset + len) > slpmsg->size)
+		if (offset < 0 || (offset + len) > slpmsg->size)
 		{
 			purple_debug_error("msn", "Oversized slpmsg\n");
 			g_return_if_reached();