summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Bailey <rekkanoryo@rekkanoryo.org>2007-11-09 08:32:29 +0000
committerJohn Bailey <rekkanoryo@rekkanoryo.org>2007-11-09 08:32:29 +0000
commitd8db809fb8515b6e659429bc039d3655fcb516a0 (patch)
treeaf7d5beef93c31a187965edfeb9ac30bdbc927d3
parent48ed82b46cefb59c122977a88193fbfc88727fde (diff)
downloadpidgin-d8db809fb8515b6e659429bc039d3655fcb516a0.tar.gz
applied changes from 1d36a128301cae57a790a087aa9c4ad8d71dad52
through 7ea551cdfc72cb2ec310d0d54d2a7e5badf7535e
-rw-r--r--libpurple/protocols/yahoo/yahoo_packet.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libpurple/protocols/yahoo/yahoo_packet.c b/libpurple/protocols/yahoo/yahoo_packet.c
index 14d0ec9241..d540f2ea70 100644
--- a/libpurple/protocols/yahoo/yahoo_packet.c
+++ b/libpurple/protocols/yahoo/yahoo_packet.c
@@ -174,8 +174,7 @@ void yahoo_packet_read(struct yahoo_packet *pkt, const guchar *data, int len)
}
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) */