Mercurial > pidgin
changeset 23057:79b4a8e0da77
MSN SLP fix
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 26 Jun 2008 19:04:52 +0000 |
parents | a94f472c7635 |
children | 00b442421563 0a7fe6eaa5ab |
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 09:14:31 2008 +0000 +++ b/libpurple/protocols/msn/slplink.c Thu Jun 26 19:04:52 2008 +0000 @@ -593,7 +593,7 @@ } else if (slpmsg->size) { - if (offset < 0 || (offset + len) > slpmsg->size) + if (G_MAXSIZE - len < offset || (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 09:14:31 2008 +0000 +++ b/libpurple/protocols/msnp9/slplink.c Thu Jun 26 19:04:52 2008 +0000 @@ -597,7 +597,7 @@ } else if (slpmsg->size) { - if (offset < 0 || (offset + len) > slpmsg->size) + if (G_MAXSIZE - len < offset || (offset + len) > slpmsg->size) { purple_debug_error("msn", "Oversized slpmsg\n"); g_return_if_reached();