From 30d598ce7cd3f136ee9d7097f39fa9818a272441 Mon Sep 17 00:00:00 2001 From: dequis Date: Sun, 29 Jan 2017 19:40:09 -0300 Subject: purple: Fix crash on ft requests from unknown contacts Followup to 701ab81 (included in 3.5) which was a partial fix which only improved things for non-libpurple file transfers (that is, just jabber) --- protocols/purple/ft.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocols/purple/ft.c b/protocols/purple/ft.c index 81fee8d0..79476ebc 100644 --- a/protocols/purple/ft.c +++ b/protocols/purple/ft.c @@ -145,6 +145,10 @@ static gboolean prplcb_xfer_new_send_cb(gpointer data, gint fd, b_input_conditio /* TODO(wilmer): After spreading some more const goodness in BitlBee, remove the evil cast below. */ px->ft = imcb_file_send_start(ic, (char *) who, xfer->filename, xfer->size); + + if (!px->ft) { + return FALSE; + } px->ft->data = px; px->ft->accept = prpl_xfer_accept; -- cgit v1.2.3