# HG changeset patch # User Paul Aurich # Date 1247890008 0 # Node ID 4e1eef14b0955f0add5c0a7d2f4ac7d1a2799352 # Parent 0ec880685f5f9e207f5956b1a91cb9d738e0e47b Add some debugging for a file transfer crash. Refs #4829. The crash is happening because something in inner_tlvlist in aim_im_sendch2_sendfile_requestdirect is NULL, which then causes aim_tlvlist_write to call byte_stream_putraw on a NULL pointer (length is greater than 0, so aim_tlvlist_write assumes there is something there). I don't see *why*, but I think this will "fix" it. diff -r 0ec880685f5f -r 4e1eef14b095 libpurple/protocols/oscar/peer.c --- a/libpurple/protocols/oscar/peer.c Sat Jul 18 03:36:33 2009 +0000 +++ b/libpurple/protocols/oscar/peer.c Sat Jul 18 04:06:48 2009 +0000 @@ -710,9 +710,18 @@ } else if (conn->type == OSCAR_CAPABILITY_SENDFILE) { + const guchar *ip_atoi = purple_network_ip_atoi(listener_ip); + if (ip_atoi == NULL) { + purple_debug_error("oscar", "Cannot send file. IP %s failed atoi.\n" + "Other possibly useful information: fd = %d, port = %d\n", + listener_ip ? listener_ip : "(null!)", conn->listenerfd, + listener_port); + purple_xfer_cancel_local(conn->xfer); + return; + } aim_im_sendch2_sendfile_requestdirect(od, conn->cookie, conn->bn, - purple_network_ip_atoi(listener_ip), + ip_atoi, listener_port, ++conn->lastrequestnumber, (const gchar *)conn->xferdata.name, conn->xferdata.size, conn->xferdata.totfiles);