Ticket #1282: 0001-Fix-null-pointer-dereference-on-ft-attempts-3.5.patch

File 0001-Fix-null-pointer-dereference-on-ft-attempts-3.5.patch, 977 bytes (added by dx, at 2017-01-30T18:20:44Z)
  • protocols/purple/ft.c

    From 30d598ce7cd3f136ee9d7097f39fa9818a272441 Mon Sep 17 00:00:00 2001
    From: dequis <dx@dxzone.com.ar>
    Date: Sun, 29 Jan 2017 19:40:09 -0300
    Subject: [PATCH] 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 b static gboolean prplcb_xfer_new_send_cb(gpointer data, gint fd, b_input_conditio 
    145145        /* TODO(wilmer): After spreading some more const goodness in BitlBee,
    146146           remove the evil cast below. */
    147147        px->ft = imcb_file_send_start(ic, (char *) who, xfer->filename, xfer->size);
     148
     149        if (!px->ft) {
     150                return FALSE;
     151        }
    148152        px->ft->data = px;
    149153
    150154        px->ft->accept = prpl_xfer_accept;