Mercurial > pidgin
changeset 21047:9f0e2db39bc5
merge of '7ea551cdfc72cb2ec310d0d54d2a7e5badf7535e'
and 'c630ec53bad2efe91357c6f37e705fbb1562d4ae'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Mon, 29 Oct 2007 04:41:19 +0000 |
parents | bc34e9806879 (diff) ecaa34fd0473 (current diff) |
children | 8b81eeaf9bcb |
files | |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_packet.c Mon Oct 29 03:10:31 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Mon Oct 29 04:41:19 2007 +0000 @@ -174,8 +174,7 @@ } if (accept) { - /* TODO: strstr() should not be used here because data isn't NULL terminated */ - delimiter = (const guchar *)strstr((char *)&data[pos], "\xc0\x80"); + delimiter = (const guchar *)g_strstr_len((const char *)&data[pos], len - pos, "\xc0\x80"); if (delimiter == NULL) { /* Malformed packet! (It doesn't end in 0xc0 0x80) */