Fri, 09 Nov 2007 08:32:29 +0000
applied changes from 1d36a128301cae57a790a087aa9c4ad8d71dad52
through 7ea551cdfc72cb2ec310d0d54d2a7e5badf7535e
| libpurple/protocols/yahoo/yahoo_packet.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/protocols/yahoo/yahoo_packet.c Thu Nov 01 20:30:44 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Fri Nov 09 08:32:29 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) */