Mercurial > pidgin
changeset 21049:8b81eeaf9bcb
merge of '5e40b4c4c0c2949025f174c4aef2da0c54d79c31'
and '886ce0e2c644e00427871777bb58888fbb8035cd'
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Mon, 29 Oct 2007 06:45:53 +0000 |
parents | 9f0e2db39bc5 (diff) fe1b44022884 (current diff) |
children | e376393e4f35 |
files | |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/yahoo/yahoo_packet.c Mon Oct 29 04:08:42 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_packet.c Mon Oct 29 06:45:53 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) */