Revision 12df03445c45ddd504a76c52aa7a78e633426dbe
Evan Schoenberg
evan.s at dreskin.net
Tue Feb 13 23:16:15 EST 2007
On Feb 13, 2007, at 7:56 PM, Etan S. C. Reisner wrote:
>
>> ============================================================
>> --- libpurple/protocols/jabber/roster.c
>> 9dd729caa6361d3cdda58d8132f12167a7304010
>> +++ libpurple/protocols/jabber/roster.c
>> 3c86f0f99618878658519a2881d9e5fef89d89d7
>> @@ -176,7 +176,7 @@ void jabber_roster_parse(JabberStream *j
>> char *jid_norm;
>> const char *username;
>>
>> - jid_norm = g_strdup(jabber_normalize(js->gc->account, jid));
>> + jid_norm = jabber_normalize(js->gc->account, jid);
>> username = gaim_account_get_username(js->gc->account);
>> me = g_utf8_collate(jid_norm,
>> jabber_normalize(js->gc->account,
>
> jabber_normalize returns a static buffer, two calls to
> jabber_normalize
> can't exist at the same time. So I'm pretty sure that
> g_utf8_collate(jid_norm, jabber_normalize(js->gc->account, username));
> isn't going to do what you want if jid_norm isn't strdup:ed.
Oh, you're absolutely right; I have no idea, looking at that a second
time, how it didn't act ridiculously for me when I used it. The
g_strdup() which was there is proper; it just needs to be g_free'd
after use. Thanks for the catch; I'll fix that right away.
-Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pidgin.im/cgi-bin/mailman/private/cabal/attachments/20070213/672ee577/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://pidgin.im/cgi-bin/mailman/private/cabal/attachments/20070213/672ee577/attachment.pgp
More information about the Cabal
mailing list