From 1c66f1328010b42deb7e50e582c6d6c43acc9e2a Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Wed, 12 May 2004 03:23:38 +0000 Subject: Fix a potential crash when sending the MSN BYE command. Submitted by: Jeremy Johnston Obtained from: Gaim CVS --- net-im/gaim/Makefile | 2 +- net-im/gaim/files/patch-msn_bye_fix | 45 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 net-im/gaim/files/patch-msn_bye_fix (limited to 'net-im') diff --git a/net-im/gaim/Makefile b/net-im/gaim/Makefile index a0dcea02f99b..ad6b51f2e9a9 100644 --- a/net-im/gaim/Makefile +++ b/net-im/gaim/Makefile @@ -6,7 +6,7 @@ PORTNAME= gaim PORTVERSION= 0.77 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net-im/gaim/files/patch-msn_bye_fix b/net-im/gaim/files/patch-msn_bye_fix new file mode 100644 index 000000000000..7217a2748e7c --- /dev/null +++ b/net-im/gaim/files/patch-msn_bye_fix @@ -0,0 +1,45 @@ +diff -urp msn-old/servconn.c msn/servconn.c +--- src/protocols/msn-old/servconn.c 2004-05-07 22:59:52.240091544 -0500 ++++ src/protocols/msn/servconn.c 2004-05-07 23:00:21.214686736 -0500 +@@ -201,6 +201,12 @@ msn_servconn_destroy(MsnServConn *servco + + g_return_if_fail(servconn != NULL); + ++ if (servconn->processing) ++ { ++ servconn->wasted = TRUE; ++ return; ++ } ++ + session = servconn->session; + + session->servconns = g_list_remove(session->servconns, servconn); +@@ -568,6 +574,8 @@ read_cb(gpointer data, gint source, Gaim + + end = old_rx_buf = servconn->rx_buf; + ++ servconn->processing = TRUE; ++ + do + { + cur = end; +@@ -608,6 +616,8 @@ read_cb(gpointer data, gint source, Gaim + } + } while (servconn->connected && servconn->rx_len); + ++ servconn->processing = FALSE; ++ + if (servconn->connected) + { + if (servconn->rx_len) +diff -urp msn-old/servconn.h msn/servconn.h +--- src/protocols/msn-old/servconn.h 2004-04-12 23:08:22.000000000 -0500 ++++ src/protocols/msn/servconn.h 2004-05-06 02:07:03.000000000 -0500 +@@ -45,6 +45,7 @@ struct _MsnServConn + MsnSession *session; + + gboolean connected; ++ gboolean processing; + gboolean wasted; + + MsnHttpMethodData *http_data; -- cgit v1.2.3