# HG changeset patch # User Mark Doliner # Date 1185260258 0 # Node ID f79b6bb6bb5f23f4196cefdba9f188503c0688de # Parent c3c610e73fc014902f434ae282ab1f67f26bfee6 Another stab at fixing that signon infinite loop diff -r c3c610e73fc0 -r f79b6bb6bb5f libpurple/protocols/oscar/family_locate.c --- a/libpurple/protocols/oscar/family_locate.c Sun Jul 22 22:08:13 2007 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Tue Jul 24 06:57:38 2007 +0000 @@ -814,7 +814,9 @@ * contain information about the buddy icon the user * has stored on the server. */ - int type2, number, length2; + guint16 type2; + guint8 number, length2; + int endpos2; /* * Continue looping as long as we're able to read type2, @@ -825,6 +827,8 @@ number = byte_stream_get8(bs); length2 = byte_stream_get8(bs); + endpos2 = byte_stream_curpos(bs) + length2; + switch (type2) { case 0x0000: { /* This is an official buddy icon? */ /* This is always 5 bytes of "0x02 01 d2 04 72"? */ @@ -883,11 +887,10 @@ outinfo->itmsurl_encoding = NULL; } } break; + } - default: { - byte_stream_advance(bs, length2); - } break; - } + /* Save ourselves. */ + byte_stream_setpos(bs, endpos2); } } else if (type == 0x001e) {