rpms/xchat-gnome/F-12 xchat-gnome-crasher.patch, NONE, 1.1 xchat-gnome.spec, 1.65, 1.66

Brian Pepple bpepple at fedoraproject.org
Wed Jan 13 18:01:08 UTC 2010


Author: bpepple

Update of /cvs/pkgs/rpms/xchat-gnome/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv14176

Modified Files:
	xchat-gnome.spec 
Added Files:
	xchat-gnome-crasher.patch 
Log Message:
* Wed Jan 13 2010 Brian Pepple <bpepple at fedoraproject.org> - 0.26.1-6
- Add patch to fix crash. (#550662)


xchat-gnome-crasher.patch:
 proto-irc.c |   30 ++++++++++++++----------------
 1 file changed, 14 insertions(+), 16 deletions(-)

--- NEW FILE xchat-gnome-crasher.patch ---
>From 1418579a815af27190b56ac3595ec8bae5b71647 Mon Sep 17 00:00:00 2001
From: Ritesh Khadgaray <khadgaray at gmail.com>
Date: Wed, 13 Jan 2010 17:26:02 +0000
Subject: Bug 592491 -  xchat-gnome crashed with SIGSEGV in handle_command(

Probable fix. This should also fix
rh bug 550662 -  [abrt] crash detected in xchat-gnome-0.26.1-5.fc12
---
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index f1ab1a8..a47f710 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -44,7 +44,7 @@
 static void
 irc_login (server *serv, char *user, char *realname)
 {
-	if (serv->password[0])
+	if (serv->password)
 		tcp_sendf (serv, "PASS %s\r\n", serv->password);
 
 	tcp_sendf (serv,
@@ -87,7 +87,7 @@ irc_ns_ghost (server *serv, char *usname, char *pass)
 static void
 irc_join (server *serv, char *channel, char *key)
 {
-	if (key[0])
+	if (key)
 		tcp_sendf (serv, "JOIN %s %s\r\n", channel, key);
 	else
 		tcp_sendf (serv, "JOIN %s\r\n", channel);
@@ -96,7 +96,7 @@ irc_join (server *serv, char *channel, char *key)
 static void
 irc_part (server *serv, char *channel, char *reason)
 {
-	if (reason[0])
+	if (reason)
 		tcp_sendf (serv, "PART %s :%s\r\n", channel, reason);
 	else
 		tcp_sendf (serv, "PART %s\r\n", channel);
@@ -105,7 +105,7 @@ irc_part (server *serv, char *channel, char *reason)
 static void
 irc_quit (server *serv, char *reason)
 {
-	if (reason[0])
+	if (reason)
 		tcp_sendf (serv, "QUIT :%s\r\n", reason);
 	else
 		tcp_send_len (serv, "QUIT\r\n", 6);
@@ -114,15 +114,16 @@ irc_quit (server *serv, char *reason)
 static void
 irc_set_back (server *serv)
 {
-	tcp_send_len (serv, "AWAY\r\n", 6);
+	tcp_send_len (serv, "BACK\r\n", 6);
 }
 
 static void
 irc_set_away (server *serv, char *reason)
 {
-	if (!reason[0])
-		reason = " ";
-	tcp_sendf (serv, "AWAY :%s\r\n", reason);
+	if (reason)
+		tcp_sendf (serv, "AWAY :%s\r\n", reason);
+	else
+	        tcp_send_len (serv, "AWAY", 6);
 }
 
 static void
@@ -146,7 +147,7 @@ irc_cycle (server *serv, char *channel, char *key)
 static void
 irc_kick (server *serv, char *channel, char *nick, char *reason)
 {
-	if (reason[0])
+	if (reason)
 		tcp_sendf (serv, "KICK %s %s :%s\r\n", channel, nick, reason);
 	else
 		tcp_sendf (serv, "KICK %s %s\r\n", channel, nick);
@@ -235,18 +236,16 @@ irc_notice (server *serv, char *channel, char *text)
 static void
 irc_topic (server *serv, char *channel, char *topic)
 {
-	if (!topic)
-		tcp_sendf (serv, "TOPIC %s :\r\n", channel);
-	else if (topic[0])
-		tcp_sendf (serv, "TOPIC %s :%s\r\n", channel, topic);
+	if (topic)
+                tcp_sendf (serv, "TOPIC %s :%s\r\n", channel, topic);
 	else
-		tcp_sendf (serv, "TOPIC %s\r\n", channel);
+		tcp_sendf (serv, "TOPIC %s :\r\n", channel);
 }
 
 static void
 irc_list_channels (server *serv, char *arg, int min_users)
 {
-	if (arg[0])
+	if (arg)
 	{
 		tcp_sendf (serv, "LIST %s\r\n", arg);
 		return;
--
cgit v0.8.3.1


Index: xchat-gnome.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xchat-gnome/F-12/xchat-gnome.spec,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -p -r1.65 -r1.66
--- xchat-gnome.spec	21 Aug 2009 16:32:11 -0000	1.65
+++ xchat-gnome.spec	13 Jan 2010 18:01:08 -0000	1.66
@@ -1,6 +1,6 @@
 Name:           xchat-gnome
 Version:        0.26.1
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        GNOME front-end to xchat
 
 Group:          Applications/Internet
@@ -12,6 +12,9 @@ Patch0:		%{name}-0.23.92-config.patch
 # Patch to fix pressing "enter" in the middle of editing channel topic.
 # RH Bug #483839
 Patch1:		xchat-topic-update.patch
+# https://bugzilla.redhat.com/show_bug.cgi?id=550662
+Patch2:		%{name}-crasher.patch
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	openssl-devel
@@ -52,7 +55,7 @@ common settings will be included in the 
 %setup -q -n %{name}-%{version}
 %patch0 -p1 -b .config
 %patch1 -p1 -b .topic
-
+%patch2 -p1 -b .crasher
 
 %build
 %configure --disable-tcl		\
@@ -140,6 +143,9 @@ fi
 
 
 %changelog
+* Wed Jan 13 2010 Brian Pepple <bpepple at fedoraproject.org> - 0.26.1-6
+- Add patch to fix crash. (#550662)
+
 * Fri Aug 21 2009 Tomas Mraz <tmraz at redhat.com> - 0.26.1-5
 - rebuilt with new openssl
 



More information about the scm-commits mailing list