# HG changeset patch # User Evan Schoenberg # Date 1184620305 0 # Node ID 2f99cf09d912bbdbd611938fb528b11f05adb9b9 # Parent d5cf2c466e9aaef0029b2a9b9bab47dc9799cd69 aim_locate_finduserinfo() can return NUL (particularly if userinfo->sn is NULL), which leads to the crash in AdiumTicket:7346. Handle this possibility rather than crashing. diff -r d5cf2c466e9a -r 2f99cf09d912 libpurple/protocols/oscar/family_locate.c --- a/libpurple/protocols/oscar/family_locate.c Mon Jul 16 21:11:23 2007 +0000 +++ b/libpurple/protocols/oscar/family_locate.c Mon Jul 16 21:11:45 2007 +0000 @@ -1264,10 +1264,13 @@ * this buddy's info explicitly, then notify them that we have info * for this buddy. */ - was_explicit = aim_locate_gotuserinfo(od, conn, userinfo2->sn); - if (was_explicit == TRUE) - if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) - ret = userfunc(od, conn, frame, userinfo2); + if (userinfo2 != NULL) + { + was_explicit = aim_locate_gotuserinfo(od, conn, userinfo2->sn); + if (was_explicit == TRUE) + if ((userfunc = aim_callhandler(od, snac->family, snac->subtype))) + ret = userfunc(od, conn, frame, userinfo2); + } return ret; }