components/desktop/pidgin/patches/pidgin-15-fix-msn-file-transfer.patch
author Rich Burridge <rich.burridge@oracle.com>
Mon, 16 Nov 2015 16:48:46 -0800
changeset 5091 81e5d6b75c3c
permissions -rw-r--r--
22185024 Move pidgin from Desktop to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5091
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
# date:2014-02-28 owner:abhijit type:bug bugdb:18157348
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# Bug 18157348 18 pidgin security advisories on 2014-01-28
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# These changes should be submitted upstream.
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
--- pidgin-2.10.9/libpurple/protocols/msn/slplink.c.orig	2014-02-24 15:29:54.414804070 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
+++ pidgin-2.10.9/libpurple/protocols/msn/slplink.c	2014-02-24 15:31:15.715299921 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
@@ -317,7 +317,10 @@ msn_slplink_send_msgpart(MsnSlpLink *slp
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
 			if (len > MSN_SBCONN_MAX_SIZE)
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
 				len = MSN_SBCONN_MAX_SIZE;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
-			msn_slpmsgpart_set_bin_data(part, slpmsg->buffer + offset, len);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
+ 			if ((slpmsg->buffer != NULL) && (slpmsg->buffer + offset != NULL) ) 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
+			{ 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
+				msn_slpmsgpart_set_bin_data(part, slpmsg->buffer + offset, len);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
+			} 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
 		}
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
 		msn_p2p_info_set_length(slpmsg->p2p_info, len);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
--- pidgin-2.10.9/libpurple/ft.c.orig	2014-02-26 11:13:12.556709745 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
+++ pidgin-2.10.9/libpurple/ft.c	2014-02-26 11:14:00.241111366 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
@@ -1659,6 +1659,8 @@ purple_xfer_get_thumbnail(const PurpleXf
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
 {
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
 	PurpleXferPrivData *priv = g_hash_table_lookup(xfers_data, xfer);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
+	if (priv == NULL)
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
+		return NULL;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
 	if (len)
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
 		*len = priv->thumbnail_size;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
 
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
--- pidgin-2.10.9/libpurple/protocols/msn/xfer.c.orig	2014-02-28 11:53:14.973470848 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
+++ pidgin-2.10.9/libpurple/protocols/msn/xfer.c	2014-02-28 11:55:54.460787530 +0530
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
@@ -147,7 +147,7 @@ msn_xfer_end_cb(MsnSlpCall *slpcall, Msn
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
 		(purple_xfer_get_status(slpcall->xfer) != PURPLE_XFER_STATUS_CANCEL_REMOTE) &&
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
 		(purple_xfer_get_status(slpcall->xfer) != PURPLE_XFER_STATUS_CANCEL_LOCAL))
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
 	{
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
-		purple_xfer_cancel_remote(slpcall->xfer);
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
+		return;
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
 	}
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
 }
81e5d6b75c3c 22185024 Move pidgin from Desktop to Userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41