rpms/centerim/FC-6 centerim-4.22.1-libyahoo.patch, NONE, 1.1 centerim-4.22.1-ljtags.patch, NONE, 1.1 centerim-4.22.1-ljtypo.patch, NONE, 1.1 centerim-4.22.1-overflows.patch, NONE, 1.1 centerim-4.22.1-quitask.patch, NONE, 1.1 centerim.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Lubomir Kundrak (lkundrak) fedora-extras-commits at redhat.com
Tue Oct 9 06:23:14 UTC 2007


Author: lkundrak

Update of /cvs/pkgs/rpms/centerim/FC-6
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20091/FC-6

Modified Files:
	.cvsignore sources 
Added Files:
	centerim-4.22.1-libyahoo.patch centerim-4.22.1-ljtags.patch 
	centerim-4.22.1-ljtypo.patch centerim-4.22.1-overflows.patch 
	centerim-4.22.1-quitask.patch centerim.spec 
Log Message:
Initial import

centerim-4.22.1-libyahoo.patch:

--- NEW FILE centerim-4.22.1-libyahoo.patch ---
Based on 2005-05-24 09:05 centericq-libyahoo.patch from centericq package

diff -Nurp centerim-4.22.1.orig/libyahoo2/yahoo_util.h centerim-4.22.1/libyahoo2/yahoo_util.h
--- centerim-4.22.1.orig/libyahoo2/yahoo_util.h	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/libyahoo2/yahoo_util.h	2007-10-02 17:59:00.000000000 +0200
@@ -68,10 +68,6 @@ int strncasecmp(const char * s1, const c
 int strcasecmp(const char * s1, const char * s2);
 
 //char * strdup(const char *s);
-
-int snprintf(char *str, size_t size, const char *format, ...);
-int vsnprintf(char *str, size_t size, const char *format, va_list ap);
-
 #endif
 
 #ifndef TRUE

centerim-4.22.1-ljtags.patch:

--- NEW FILE centerim-4.22.1-ljtags.patch ---
Based on 2006-03-02 22:47 centericq-4.20.0-ljtags.patch from centericq package,
that came from here http://www.crystalowl.net/patches/centericq-4.20.0-ljtags.patch

diff -Nurp centerim-4.22.1.orig/src/hooks/ljhook.cc centerim-4.22.1/src/hooks/ljhook.cc
--- centerim-4.22.1.orig/src/hooks/ljhook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/ljhook.cc	2007-10-02 18:02:26.000000000 +0200
@@ -266,6 +266,7 @@ bool ljhook::send(const imevent &asev) {
 	    if(!m->field_empty("subject")) ev->addParam("subject", rusconv("ku", m->getfield("subject")));
 	    if(!m->field_empty("mood")) ev->addParam("prop_current_mood", rusconv("ku", m->getfield("mood")));
 	    if(!m->field_empty("music")) ev->addParam("prop_current_music", rusconv("ku", m->getfield("music")));
+	    if(!m->field_empty("taglist")) ev->addParam("prop_taglist", rusconv("ku", m->getfield("taglist")));
 	    if(!m->field_empty("picture")) ev->addParam("prop_picture_keyword", m->getfield("picture"));
 
 	    if(!m->field_empty("preformatted")) ev->addParam("prop_opt_preformatted", "1");
diff -Nurp centerim-4.22.1.orig/src/icqdialogs.cc centerim-4.22.1/src/icqdialogs.cc
--- centerim-4.22.1.orig/src/icqdialogs.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/icqdialogs.cc	2007-10-02 18:02:26.000000000 +0200
@@ -1956,6 +1956,8 @@ bool icqface::setljparams(imxmlevent *ev
 	svalues.push_back("usemask");
     }
 
+    ev->setfield("taglist", "");
+
     textwindow w(0, 0, sizeDlg.width, sizeDlg.height, conf.getcolor(cp_dialog_frame), TW_CENTERED);
     w.set_title(conf.getcolor(cp_dialog_highlight), _(" LiveJournal posting: attributes "));
     db.setwindow(&w, false);
@@ -1993,6 +1995,7 @@ bool icqface::setljparams(imxmlevent *ev
 
 	t.addleaff(i, 0, 21, _(" Music : %s "), ev->getfield("music").c_str());
 	t.addleaff(i, 0, 22, _(" Picture : %s "), ev->getfield("picture").empty() ? _("(default)") : ev->getfield("picture").c_str());
+	t.addleaff(i, 0, 25, _(" Tags : %s "), ev->getfield("taglist").c_str());
 
 	i = t.addnode(_(" Options "));
 	t.addleaff(i, 0, 30, _(" Disable auto-formatting : %s "), stryesno(ev->getfield("preformatted") == "1"));
@@ -2018,6 +2021,7 @@ bool icqface::setljparams(imxmlevent *ev
 		    case 21: LJP_STR("music", _("Currently playing: ")); break;
 		    case 22: LJP_LIST("picture", pictures, _("(default)")); break;
 		    case 23: LJP_STR("mood", _("Current mood: ")); break;
+		    case 25: LJP_STR("taglist", _("Tags for the entry: ")); break;
 		    case 30: LJP_BOOL("preformatted"); break;
 		    case 31: LJP_BOOL("noemail"); break;
 		    case 32: LJP_BOOL("nocomments"); break;

centerim-4.22.1-ljtypo.patch:

--- NEW FILE centerim-4.22.1-ljtypo.patch ---
Based on 2006-03-02 22:55 centericq-ljtypo.patch from centericq package

diff -Nurp centerim-4.22.1.orig/src/accountmanager.cc centerim-4.22.1/src/accountmanager.cc
--- centerim-4.22.1.orig/src/accountmanager.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/accountmanager.cc	2007-10-02 17:29:31.000000000 +0200
@@ -241,7 +241,7 @@ void accountmanager::exec() {
 
 		case 11:
 		    a.additional["importfriends"] =
-			(a.additional["importfriends"] == "") ? "1" : "0";
+			(a.additional["importfriends"] == "1") ? "0" : "1";
 		    break;
 
 		case 12:

centerim-4.22.1-overflows.patch:

--- NEW FILE centerim-4.22.1-overflows.patch ---
Based on 2007-07-19 02:09 centericq-4.21.0-overflows.patch from centericq package

Fixes CVE-2007-0160 and CVE-2007-3713 buffer overflows,
some of them remotely exploitable.      (Lubomir Kundrak <lkundrak at redhat.com>)

diff -Nurp centerim-4.22.1.orig/src/hooks/abstracthook.cc centerim-4.22.1/src/hooks/abstracthook.cc
--- centerim-4.22.1.orig/src/hooks/abstracthook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/abstracthook.cc	2007-10-02 17:33:30.000000000 +0200
@@ -40,6 +40,8 @@
 
 #include <time.h>
 
+#define NOTIFBUF 512
+
 time_t timer_current = time(0);
 
 abstracthook::abstracthook(protocolname aproto)
@@ -342,7 +344,7 @@ bool abstracthook::regattempt(unsigned i
 
 void abstracthook::log(logevent ev, ...) {
     va_list ap;
-    char buf[512];
+    char buf[NOTIFBUF];
     static map<logevent, string> lst;
 
     if(lst.empty()) {
@@ -357,7 +359,8 @@ void abstracthook::log(logevent ev, ...)
     }
 
     va_start(ap, ev);
-    vsprintf(buf, lst[ev].c_str(), ap);
+    vsnprintf(buf, NOTIFBUF, lst[ev].c_str(), ap);
+    buf[NOTIFBUF-1] = '\0';
     va_end(ap);
 
     face.log((string) "+ [" + conf.getprotocolname(proto)  + "] " + buf);
@@ -754,7 +757,7 @@ string abstracthook::getTimezoneIDtoStri
     if(id > 24 || id < -24) {
 	return "Unspecified";
     } else {
-	char buf[32];
+	static char buf[32];
 	sprintf(buf, "GMT %s%d:%s", id > 0 ? "-" : "+", abs(id/2), id % 2 == 0 ? "00" : "30");
 	return buf;
     }
diff -Nurp centerim-4.22.1.orig/src/hooks/aimhook.cc centerim-4.22.1/src/hooks/aimhook.cc
--- centerim-4.22.1.orig/src/hooks/aimhook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/aimhook.cc	2007-10-02 17:35:20.000000000 +0200
@@ -32,6 +32,8 @@
 #include "imlogger.h"
 #include "eventmanager.h"
 
+#define NOTIFBUF 512
+
 aimhook ahook;
 
 aimhook::aimhook()
@@ -294,7 +296,8 @@ void aimhook::loadprofile() {
 
     if(access(fname.c_str(), R_OK)) {
 	char sbuf[512];
-	sprintf(sbuf, _("I do really enjoy the default AIM profile of centerim %s."), VERSION);
+	snprintf(sbuf, NOTIFBUF, _("I do really enjoy the default AIM profile of centerim %s."), VERSION);
+	sbuf[NOTIFBUF-1] = '\0';
 	profile.info = sbuf;
 	saveprofile();
     }
diff -Nurp centerim-4.22.1.orig/src/hooks/irchook.cc centerim-4.22.1/src/hooks/irchook.cc
--- centerim-4.22.1.orig/src/hooks/irchook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/irchook.cc	2007-10-02 17:40:22.000000000 +0200
@@ -35,6 +35,8 @@
 
 #include <iterator>
 
+#define NOTIFBUF 512
+
 // ----------------------------------------------------------------------------
 
 irchook irhook;
@@ -610,11 +612,12 @@ void irchook::rawcommand(const string &c
 
 void irchook::channelfatal(string room, const char *fmt, ...) {
     va_list ap;
-    char buf[1024];
+    char buf[NOTIFBUF];
     vector<channelInfo>::iterator i;
 
     va_start(ap, fmt);
-    vsprintf(buf, fmt, ap);
+    vsnprintf(buf, NOTIFBUF, fmt, ap);
+    buf[NOTIFBUF-1] = '\0';
     va_end(ap);
 
     if(room.substr(0, 1) != "#")
@@ -1197,7 +1200,7 @@ void irchook::errorhandler(void *connect
 void irchook::nickchanged(void *connection, void *cli, ...) {
     va_list ap;
     icqcontact *c;
-    char buf[100];
+    char buf[NOTIFBUF];
 
     va_start(ap, cli);
     char *oldnick = va_arg(ap, char *);
@@ -1219,7 +1222,8 @@ void irchook::nickchanged(void *connecti
 
 	    }
 
-	    sprintf(buf, _("The user has changed their nick from %s to %s"), oldnick, newnick);
+	    snprintf(buf, NOTIFBUF, _("The user has changed their nick from %s to %s"), oldnick, newnick);
+	    buf[NOTIFBUF-1] = '\0';
 	    em.store(imnotification(c, buf));
 	}
     }
@@ -1255,18 +1259,20 @@ const char * const command, const char *
 
 void irchook::subreply(void *conn, void *cli, const char * const nick,
 const char * const command, const char * const args) {
-    char buf[512];
+    char buf[NOTIFBUF];
 
     if(!strcmp(command, "PING")) {
 	map<string, time_t>::iterator i = irhook.pingtime.find(up(nick));
 
 	if(i != irhook.pingtime.end()) {
-	    sprintf(buf, _("PING reply from the user: %d second(s)"), time(0)-i->second);
+	    snprintf(buf, NOTIFBUF, _("PING reply from the user: %d second(s)"), time(0)-i->second);
+	    buf[NOTIFBUF-1] = '\0';
 	    em.store(imnotification(imcontact(nick, irc), buf));
 	}
 
     } else if(!strcmp(command, "VERSION")) {
-	sprintf(buf, _("The remote is using %s"), args);
+	snprintf(buf, NOTIFBUF, _("The remote is using %s"), args);
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(imcontact(nick, irc), buf));
 
     }
@@ -1379,8 +1385,9 @@ void irchook::chatuserjoined(void *conn,
 	if(strlen(email))
 	    uname += (string) " (" + email + ")";
 
-	char buf[512];
-	sprintf(buf, _("%s has joined."), uname.c_str());
+	char buf[NOTIFBUF];
+	snprintf(buf, NOTIFBUF, _("%s has joined."), uname.c_str());
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(imcontact(room, irc), buf));
     }
 }
@@ -1397,15 +1404,17 @@ void irchook::chatuserleft(void *conn, v
     if(conf.getourid(irc).nickname != who) {
 	string text;
 	string text2;
-	char buf[512];
+	char buf[NOTIFBUF];
 
-	sprintf(buf, _("%s has left"), who); text = buf;
+	snprintf(buf, NOTIFBUF, _("%s has left"), who); text = buf;
+	buf[NOTIFBUF-1] = '\0';
 
 	if(reason)
 	if(strlen(reason)) {
 	    if(strlen(reason) > 450) reason[450] = 0;
     	    text2 = irhook.rushtmlconv( "wk", reason );
-	    sprintf(buf, _("reason: %s"), text2.c_str() );
+	    snprintf(buf, NOTIFBUF, _("reason: %s"), reason);
+	    buf[NOTIFBUF-1] = '\0';
 	    text += (string) "; " + buf + ".";
 	}
 
@@ -1425,13 +1434,15 @@ void irchook::chatuserkicked(void *conn,
 
     if(conf.getourid(irc).nickname != who) {
 	string text;
-	char buf[512];
+	char buf[NOTIFBUF];
 
-	sprintf(buf, _("%s has been kicked by %s"), who, by); text = buf;
+	snprintf(buf, NOTIFBUF, _("%s has been kicked by %s"), who, by); text = buf;
+	buf[NOTIFBUF-1] = '\0';
 
 	if(reason)
 	if(strlen(reason)) {
-	    sprintf(buf, _("reason: %s"), reason);
+	    snprintf(buf, NOTIFBUF, _("reason: %s"), reason);
+	    buf[NOTIFBUF-1] = '\0';
 	    text += (string) "; " + buf + ".";
 	}
 
@@ -1454,14 +1465,16 @@ void irchook::chatgottopic(void *conn, v
 	return;
 
     string text;
-    char buf[1024];
+    char buf[NOTIFBUF];
     text = irhook.rushtmlconv( "wk", topic );
-    sprintf(buf, _("Channel topic now is: %s"), text.c_str());
+    snprintf(buf, NOTIFBUF, _("Channel topic now is: %s"), text.c_str());
+    buf[NOTIFBUF-1] = '\0';
     text = buf;
 
     if(author)
     if(strlen(author)) {
-	sprintf(buf, _("set by %s"), author);
+	snprintf(buf, NOTIFBUF, _("set by %s"), author);
+	buf[NOTIFBUF-1] = '\0';
 	text += (string) "; " + buf + ".";
     }
 
@@ -1478,8 +1491,9 @@ void irchook::chatuseropped(void *conn, 
     va_end(ap);
 
     if(by) {
-	char buf[512];
-	sprintf(buf, _("%s has been opped by %s."), who, by);
+	char buf[NOTIFBUF];
+	snprintf(buf, NOTIFBUF, _("%s has been opped by %s."), who, by);
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(imcontact(room, irc), buf));
     }
 }
@@ -1494,8 +1508,9 @@ void irchook::chatuserdeopped(void *conn
     va_end(ap);
 
     if(by) {
-	char buf[512];
-	sprintf(buf, _("%s has been deopped by %s."), who, by);
+	char buf[NOTIFBUF];
+	snprintf(buf, NOTIFBUF, _("%s has been deopped by %s."), who, by);
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(imcontact(room, irc), buf));
     }
 }
@@ -1508,10 +1523,10 @@ void irchook::chatopped(void *conn, void
     char *by = va_arg(ap, char *);
     va_end(ap);
 
-    char buf[512];
-    if(by) sprintf(buf, _("%s has opped us."), by);
-	else strcpy(buf, _("you are an op here"));
-
+    char buf[NOTIFBUF];
+    if(by) snprintf(buf, NOTIFBUF, _("%s has opped us."), by);
+	else strncpy(buf, _("you are an op here"), NOTIFBUF);
+    buf[NOTIFBUF-1] = '\0';
     em.store(imnotification(imcontact(room, irc), buf));
 }
 
@@ -1523,8 +1538,9 @@ void irchook::chatdeopped(void *conn, vo
     char *by = va_arg(ap, char *);
     va_end(ap);
 
-    char buf[512];
-    sprintf(buf, _("%s has deopped us."), by);
+    char buf[NOTIFBUF];
+    snprintf(buf, NOTIFBUF, _("%s has deopped us."), by);
+    buf[NOTIFBUF-1] = '\0';
     em.store(imnotification(imcontact(room, irc), buf));
 }
 
diff -Nurp centerim-4.22.1.orig/src/hooks/jabberhook.cc centerim-4.22.1/src/hooks/jabberhook.cc
--- centerim-4.22.1.orig/src/hooks/jabberhook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/jabberhook.cc	2007-10-02 17:33:30.000000000 +0200
@@ -36,6 +36,8 @@
 #define DEFAULT_CONFSERV "conference.jabber.org"
 #define PERIOD_KEEPALIVE 30
 
+#define NOTIFBUF 512
+
 static void jidsplit(const string &jid, string &user, string &host, string &rest) {
     int pos;
     user = jid;
@@ -1350,8 +1352,9 @@ void jabberhook::gotversion(const imcont
 	if(vinfo.size() > 128)
 	    vinfo.erase(128);
 
-	char buf[256];
-	sprintf(buf, _("The remote is using %s"), vinfo.c_str());
+	char buf[NOTIFBUF];
+	snprintf(buf, NOTIFBUF, _("The remote is using %s"), vinfo.c_str());
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(ic, buf));
     }
 }
diff -Nurp centerim-4.22.1.orig/src/hooks/ljhook.cc centerim-4.22.1/src/hooks/ljhook.cc
--- centerim-4.22.1.orig/src/hooks/ljhook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/ljhook.cc	2007-10-02 17:43:10.000000000 +0200
@@ -37,6 +37,8 @@ ljhook lhook;
 
 #define PERIOD_FRIENDS  3600
 
+#define NOTIFBUF 512
+
 ljhook::ljhook(): abstracthook(livejournal), fonline(false), sdest(0) {
     fcapabs.insert(hookcapab::nochat);
 }
@@ -654,7 +656,7 @@ void ljhook::messageack_cb(MessageEvent 
 	    map<string, string> nfriendof;
 	    map<string, string>::const_iterator in;
 	    vector<string>::iterator il;
-	    char buf[512];
+	    char buf[NOTIFBUF];
 
 	    for(i = 1; i <= count; i++) {
 		username = params[(string) "friendof_" + i2str(i) + "_user"];
@@ -669,8 +671,9 @@ void ljhook::messageack_cb(MessageEvent 
 		if(!foempty) {
 		    bd = (string) "http://" + conf.getourid(proto).server + "/users/" + in->first;
 
-		    snprintf(buf, sizeof(buf), _("The user %s (%s) has added you to his/her friend list\n\nJournal address: %s"),
+		    snprintf(buf, NOTIFBUF, _("The user %s (%s) has added you to his/her friend list\n\nJournal address: %s"),
 			in->first.c_str(), in->second.c_str(), bd.c_str());
+		    buf[NOTIFBUF-1] = '\0';
 
 		    em.store(imnotification(self, buf));
 		}
@@ -679,8 +682,9 @@ void ljhook::messageack_cb(MessageEvent 
 	    for(il = friendof.begin(); il != friendof.end(); ) {
 		if(nfriendof.find(*il) == nfriendof.end()) {
 		    bd = (string) "http://" + conf.getourid(proto).server + "/users/" + *il;
-		    snprintf(buf, sizeof(buf), _("The user %s has removed you from his/her friend list\n\nJournal address: %s"),
+		    snprintf(buf, NOTIFBUF, _("The user %s has removed you from his/her friend list\n\nJournal address: %s"),
 			il->c_str(), bd.c_str());
+		    buf[NOTIFBUF-1] = '\0';
 		    em.store(imnotification(self, buf));
 		    friendof.erase(il);
 		    il = friendof.begin();
Binary files centerim-4.22.1.orig/src/hooks/.ljhook.cc.rej.swp and centerim-4.22.1/src/hooks/.ljhook.cc.rej.swp differ
diff -Nurp centerim-4.22.1.orig/src/hooks/yahoohook.cc centerim-4.22.1/src/hooks/yahoohook.cc
--- centerim-4.22.1.orig/src/hooks/yahoohook.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/hooks/yahoohook.cc	2007-10-02 17:33:30.000000000 +0200
@@ -47,6 +47,8 @@
 #define PERIOD_REFRESH          60
 #define PERIOD_CLOSE            6
 
+#define NOTIFBUF 512
+
 int yahoohook::yfd::connection_tags = 0;
 
 char pager_host[255], pager_port[255], filetransfer_host[255],
@@ -852,7 +854,7 @@ void yahoohook::got_conf_invite(int id, 
     icqconf::imaccount acc = conf.getourid(yahoo);
     string confname = (string) "#" + room, inviter, text;
     vector<string>::iterator ic;
-    char buf[1024];
+    char buf[NOTIFBUF];
     int i;
 
     imcontact cont(confname, yahoo);
@@ -864,10 +866,11 @@ void yahoohook::got_conf_invite(int id, 
 	inviter.erase(i);
     }
 
-    sprintf(buf, _("The user %s has invited you to the %s conference, the topic there is: %s"),
+    snprintf(buf, NOTIFBUF, _("The user %s has invited you to the %s conference, the topic there is: %s"),
 	yhook.rusconv("wk", inviter).c_str(),
 	yhook.rusconv("wk", room).c_str(),
 	yhook.rusconv("wk", msg).c_str());
+    buf[NOTIFBUF-1] = '\0';
 
     text = (string) buf + "\n\n" + _("Current conference members are: ");
     yhook.confmembers[room].push_back(inviter);
@@ -896,20 +899,22 @@ void yahoohook::got_conf_invite(int id, 
 
 void yahoohook::conf_userdecline(int id, char *who, char *room, char *msg) {
     icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo));
-    char buf[512];
+    char buf[NOTIFBUF];
 
     if(c) {
-	sprintf(buf, _("The user %s has declined your invitation to join the conference"), who);
+	snprintf(buf, NOTIFBUF, _("The user %s has declined your invitation to join the conference"), who);
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(c, buf));
     }
 }
 
 void yahoohook::conf_userjoin(int id, char *who, char *room) {
     icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo));
-    char buf[512];
+    char buf[NOTIFBUF];
 
     if(c) {
-	sprintf(buf, _("The user %s has joined the conference"), who);
+	snprintf(buf, NOTIFBUF, _("The user %s has joined the conference"), who);
+	buf[NOTIFBUF-1] = '\0';
 
 	if(find(yhook.confmembers[room].begin(), yhook.confmembers[room].end(), who) == yhook.confmembers[room].end())
 	    yhook.confmembers[room].push_back(who);
@@ -920,11 +925,12 @@ void yahoohook::conf_userjoin(int id, ch
 
 void yahoohook::conf_userleave(int id, char *who, char *room) {
     icqcontact *c = clist.get(imcontact((string) "#" + room, yahoo));
-    char buf[512];
+    char buf[NOTIFBUF];
     vector<string>::iterator im;
 
     if(c) {
-	sprintf(buf, _("The user %s has left the conference"), who);
+	snprintf(buf, NOTIFBUF, _("The user %s has left the conference"), who);
+	buf[NOTIFBUF-1] = '\0';
 	em.store(imnotification(c, buf));
 
 	im = find(yhook.confmembers[room].begin(), yhook.confmembers[room].end(), who);
@@ -989,10 +995,11 @@ void yahoohook::game_notify(int id, char
 }
 
 void yahoohook::mail_notify(int id, char *from, char *subj, int cnt) {
-    char buf[1024];
+    char buf[NOTIFBUF];
 
     if(from && subj) {
-	sprintf(buf, _("+ [yahoo] e-mail from %s, %s"), from, subj);
+	snprintf(buf, NOTIFBUF, _("+ [yahoo] e-mail from %s, %s"), from, subj);
+	buf[NOTIFBUF-1] = '\0';
 	face.log(buf);
 	clist.get(contactroot)->playsound(imevent::email);
     }
@@ -1146,11 +1153,12 @@ void yahoohook::webcam_data_request(int 
 
 int yahoohook::ylog(char *fmt, ...) {
     if(conf.getdebug()) {
-	char buf[512];
+	char buf[NOTIFBUF];
 	va_list ap;
 
 	va_start(ap, fmt);
-	vsprintf(buf, fmt, ap);
+	vsnprintf(buf, NOTIFBUF, fmt, ap);
+	buf[NOTIFBUF-1] = '\0';
 	va_end(ap);
 
 	face.log(buf);

centerim-4.22.1-quitask.patch:

--- NEW FILE centerim-4.22.1-quitask.patch ---
Based on 2006-03-02 22:47 centericq-quitask.patch from centericq package

diff -Nurp centerim-4.22.1.orig/src/icqconf.cc centerim-4.22.1/src/icqconf.cc
--- centerim-4.22.1.orig/src/icqconf.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/icqconf.cc	2007-10-02 18:03:05.000000000 +0200
@@ -495,6 +495,7 @@ void icqconf::loadmainconfig() {
 	    if(param == "russian" || param == "convert") initmultiproto(cpconvert, buf, false); else
 	    if(param == "nobidi") setbidi(false); else
 	    if(param == "askaway") askaway = true; else
+	    if(param == "askquit") askquit = true; else
 	    if(param == "logtimestamps") logtimestamps = true; else
 	    if(param == "logonline") logonline = true; else
 	    if(param == "fromcharset") fromcharset = buf; else
@@ -593,6 +594,7 @@ void icqconf::save() {
 	    f << "tocharset\t" << tocharset << endl;
 
 	    if(!getbidi()) f << "nobidi" << endl;
+	    if(getaskquit()) f << "askquit" << endl;
 	    if(logtimestamps) f << "logtimestamps" << endl;
 	    if(timestampstothesecond) f << "timestampstothesecond" << endl;
 	    if(logonline) f << "logonline" << endl;
@@ -1015,6 +1017,9 @@ void icqconf::setscreensocketpath(string
 void icqconf::setquote(bool use) {
     quote = use;
 }
+void icqconf::setaskquit(bool faskquit) { 
+    askquit = faskquit; 
+} 
 
 void icqconf::setsockshost(const string &nsockshost) {
     int pos;
diff -Nurp centerim-4.22.1.orig/src/icqconf.h centerim-4.22.1/src/icqconf.h
--- centerim-4.22.1.orig/src/icqconf.h	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/icqconf.h	2007-10-02 18:03:05.000000000 +0200
@@ -146,7 +146,7 @@ class icqconf {
 	bool hideoffline, quote, savepwd, antispam, screenna, mailcheck,
 	    makelog, fenoughdiskspace, askaway, bidi, logtimestamps,
 	    logonline, emacs, proxyconnect, proxyssl, notitles, debug,
-	    timestampstothesecond, dropauthreq, usingcaptcha;
+	    timestampstothesecond, dropauthreq, usingcaptcha, askquit;
 
 	unsigned int captchatimeout;
 
@@ -275,6 +275,9 @@ class icqconf {
 
 	bool getchatmode(protocolname pname);
 	void setchatmode(protocolname pname, bool fchatmode);
+	
+        bool getaskquit() const { return askquit; } 
+        void setaskquit(bool faskquit); 
 
 	bool getentersends(protocolname pname);
 	void setentersends(protocolname pname, bool fentersends);
diff -Nurp centerim-4.22.1.orig/src/icqdialogs.cc centerim-4.22.1/src/icqdialogs.cc
--- centerim-4.22.1.orig/src/icqdialogs.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/icqdialogs.cc	2007-10-02 18:03:05.000000000 +0200
@@ -1108,6 +1108,7 @@ bool icqface::updateconf(icqconf::regsou
     bool makelog = conf.getmakelog();
     bool askaway = conf.getaskaway();
     bool bidi = conf.getbidi();
+    bool askquit = conf.getaskquit();
     bool emacs = conf.getemacs();
     bool proxyconnect = conf.getproxyconnect();
     bool timestampstothesecond = conf.gettimestampstothesecond();
@@ -1194,6 +1195,7 @@ bool icqface::updateconf(icqconf::regsou
 	t.addleaff(i, 0, 20, _( " Enable bidirectional languages support : %s "), stryesno(bidi));
     #endif
 	t.addleaff(i, 0, 23, _(" Enable emacs bindings in text editor : %s "), stryesno(emacs));
+	t.addleaff(i, 0, 52, _(" Ask before quit : %s "), stryesno(askquit));
 
 	i = t.addnode(_(" Codepages conversion "));
 
@@ -1439,6 +1441,9 @@ bool icqface::updateconf(icqconf::regsou
 			if (dropauthreq && usingcaptcha)
 				dropauthreq = false;
 			break;
+		    case 53:
+		    	askquit = !askquit;
+			break;
   		}
   		break;
 	    case 1:
@@ -1470,6 +1475,7 @@ bool icqface::updateconf(icqconf::regsou
 		}
 
 		conf.setbidi(bidi);
+		conf.setaskquit(askquit);
 		conf.setlogoptions(logtimestamps, logonline);
 
 		if(ptp) conf.setpeertopeer(ptpmin, ptpmax);
diff -Nurp centerim-4.22.1.orig/src/icqface.cc centerim-4.22.1/src/icqface.cc
--- centerim-4.22.1.orig/src/icqface.cc	2007-10-02 17:24:40.000000000 +0200
+++ centerim-4.22.1/src/icqface.cc	2007-10-02 18:03:05.000000000 +0200
@@ -3282,6 +3282,9 @@ int icqface::contactskeys(verticalmenu &
 	    break;
 
 	case key_quit:
+	    if (conf.getaskquit())
+		if(face.ask("Really Quit?", ASK_YES | ASK_NO, ASK_NO) == ASK_NO)
+		    break;
 	    face.extk = ACT_QUIT;
 	    break;
 


--- NEW FILE centerim.spec ---
# These are ugly and will go away on next formal release
%define         stable_ver      4.22.1
%define         snapshot_ver    20071003

Name:           centerim
Version:        %{snapshot_ver}
Release:        1%{?dist}

Summary:        Text mode menu- and window-driven IM

Group:          Applications/Internet
License:        GPLv2+
URL:            http://www.centerim.org/
Source0:        http://www.centerim.org/download/%{name}-%{version}.tar.gz

Patch0:         centerim-4.22.1-libyahoo.patch
Patch7:         centerim-4.22.1-overflows.patch

## feature fixes
# Fix ljhook
Patch101:       centerim-4.22.1-ljtags.patch
Patch102:       centerim-4.22.1-ljtypo.patch

## feature enh
# provided by Andy Shevchenko... will ask before quit
Patch201:       centerim-4.22.1-quitask.patch

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  curl-devel
BuildRequires:  ncurses-devel >= 4.2
BuildRequires:  gettext-devel
BuildRequires:  gpgme-devel
BuildRequires:  openssl-devel
BuildRequires:  libjpeg-devel

%description
CenterIM is a text mode menu- and window-driven IM interface that supports
the ICQ2000, Yahoo!, MSN, AIM TOC, IRC, Gadu-Gadu and Jabber protocols.
Internal RSS reader and a client for LiveJournal are provided.

%prep
%setup -q -n %{name}-%{stable_ver}
%patch0 -p1 -b .libyahoo
%patch7 -p1 -b .overflows
%patch101 -p1 -b .ljtags
%patch102 -p1 -b .ljtypo
%patch201 -p1 -b .quitask

%build
%configure \
	--with-ssl \
	--disable-rpath \
	--enable-locales-fix
make %{?_smp_flags}

%check
make check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%find_lang %{name}

rm -f $RPM_BUILD_ROOT%{_infodir}/dir
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc ABOUT-NLS AUTHORS COPYING ChangeLog FAQ NEWS README THANKS TODO
%{_bindir}/*
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/*
%{_mandir}/man1/*

%changelog
* Mon Oct 08 2007 Lubomir Kundrak <lkundrak at redhat.com> - 20071003-2
- Fixed BuildRoot
- Removed redundant BuildReq
- Rebased to more current upstream tarball

* Tue Oct 02 2007 Lubomir Kundrak <lkundrak at redhat.com> - 20070625-1
- fork centerim from centericq

* Wed Aug 22 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- 4.21.0-14
- new license tag
- rebuild for ppc32 (devel)

* Thu Jul 19 2007 Lubomir Kundrak <lkundrak at redhat.com>
- fix CVE-2007-3713 multiple buffer overflows (#247979)

* Sun Jun 03 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
- fix #242344

* Sun Apr 01 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-12
- fix #233808 (503 jabber disco)
- fix #233901 (no sound/no translation)

* Sat Feb 10 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-11
- fix CVE-2007-160 (#227791)

* Mon Jan 08 2007 Kevin Fenzi <kevin at tummy.com>
4.21.0-10
- Tweak to build on fc7 and rebuild for new curl

* Mon Nov 06 2006 Jindrich Novy <jnovy at redhat.com>
- rebuild because of the new curl

* Tue Sep 12 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-8
- FE6 rebuild

* Thu Mar 02 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-7
- fix #183623: ask before quit
- fix #183625, #183626: fixes lj hook

* Wed Mar 01 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-6
- improve utf8 support

* Tue Feb 14 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-5
- Rebuild for Fedora Extras 5

* Tue Jan 03 2006 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-4
- Fix more security related stuff
- Fix libmsn

* Thu Nov 10 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-2
- rebuild

* Tue Sep 27 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.21.0-1
- version upgrade (#168425)

* Mon May 30 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-10
- cleanup the x86_64 build fixes...

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-9
- hopefully the last x86_64 build fixes...

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-8
- and again more size_t fixes in src

* Sun May 29 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-7
- even more size_t build fixes in kkstrtext

* Thu May 26 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-6
- renew -5 buildfix and drop ifarch
- add another x86_64 buildfix

* Thu May 26 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-5
- x86_64 buildfix

* Mon May 23 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-4
- enable jabber encryption support via gpgme
- fix build (#156202)

* Sun May 22 2005 Jeremy Katz <katzj at redhat.com> - 4.20.0-3
- rebuild on all arches

* Fri Apr  7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt

* Tue Feb 08 2005 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.20.0-1
- version upgrade
- remove libicq2000 exclude (not needed anymore)
- fixed BuildRequires

* Tue Dec 21 2004 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
4.13.0-1
- version upgrade
- exclude libicq2000 headers (may conflict with libicq2000-devel)
- drop GCC 3.4 patch (not needed anymore)

* Fri Nov 12 2004 Michael Schwendt <mschwendt[AT]users.sf.net> - 4.9.4-3
- Fix C++ code for FC3/GCC 3.4.

* Sun Jul 13 2003 Andreas Bierfert (awjb) <andreas.bierfert[AT]awbsworld.de>
0:4.9.4-0.fdr.2
- Fixed issues mentioned in #446 by Michael Schwendt
* Thu Jul 03 2003 Andreas Bierfert (awjb) <andreas.bierfert[AT]awbsworld.de>
0:4.9.4-0.fdr.1
- Initial RPM release.


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/centerim/FC-6/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	9 Oct 2007 04:25:17 -0000	1.1
+++ .cvsignore	9 Oct 2007 06:22:41 -0000	1.2
@@ -0,0 +1 @@
+centerim-20071003.tar.gz


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/centerim/FC-6/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	9 Oct 2007 04:25:17 -0000	1.1
+++ sources	9 Oct 2007 06:22:41 -0000	1.2
@@ -0,0 +1 @@
+ca0b169aee9f730d63fff0fb4f7af03e  centerim-20071003.tar.gz




More information about the fedora-extras-commits mailing list