rpms/znc/EL-4 znc-trafficstats.patch,NONE,1.1 znc.spec,1.16,1.17

Nick Bebout nb at fedoraproject.org
Wed Jun 16 22:16:37 UTC 2010


Author: nb

Update of /cvs/pkgs/rpms/znc/EL-4
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv25694/EL-4

Modified Files:
	znc.spec 
Added Files:
	znc-trafficstats.patch 
Log Message:
Really add znc-trafficstats.patch this time

znc-trafficstats.patch:
 znc.cpp |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- NEW FILE znc-trafficstats.patch ---
--- znc-0.090/znc.cpp	2010-05-10 12:45:15.000000000 -0500
+++ trunk/znc.cpp	2010-06-16 16:43:48.706323545 -0500
@@ -1914,18 +1914,18 @@
 	}
 
 	for (CSockManager::const_iterator it = m_Manager.begin(); it != m_Manager.end(); ++it) {
+		CUser *pUser = NULL;
 		if ((*it)->GetSockName().Left(5) == "IRC::") {
-			CIRCSock *p = (CIRCSock *) *it;
-			ret[p->GetUser()->GetUserName()].first  += p->GetBytesRead();
-			ret[p->GetUser()->GetUserName()].second += p->GetBytesWritten();
-			uiUsers_in  += p->GetBytesRead();
-			uiUsers_out += p->GetBytesWritten();
+			pUser = ((CIRCSock *) *it)->GetUser();
 		} else if ((*it)->GetSockName().Left(5) == "USR::") {
-			CClient *p = (CClient *) *it;
-			ret[p->GetUser()->GetUserName()].first  += p->GetBytesRead();
-			ret[p->GetUser()->GetUserName()].second += p->GetBytesWritten();
-			uiUsers_in  += p->GetBytesRead();
-			uiUsers_out += p->GetBytesWritten();
+			pUser = ((CClient*) *it)->GetUser();
+		}
+
+		if (pUser) {
+			ret[pUser->GetUserName()].first  += (*it)->GetBytesRead();
+			ret[pUser->GetUserName()].second += (*it)->GetBytesWritten();
+			uiUsers_in  += (*it)->GetBytesRead();
+			uiUsers_out += (*it)->GetBytesWritten();
 		} else {
 			uiZNC_in  += (*it)->GetBytesRead();
 			uiZNC_out += (*it)->GetBytesWritten();


Index: znc.spec
===================================================================
RCS file: /cvs/pkgs/rpms/znc/EL-4/znc.spec,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -p -r1.16 -r1.17
--- znc.spec	6 Jun 2010 23:02:06 -0000	1.16
+++ znc.spec	16 Jun 2010 22:16:37 -0000	1.17
@@ -2,21 +2,19 @@ Summary:        An advanced IRC bouncer
 Name:           znc
 Version:        0.090
 #Release:        0.1.rc1%{?dist}
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2 with exceptions
 Group:          System Environment/Daemons
 URL:            http://znc.sf.net/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
+Patch0:         znc-trafficstats.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 BuildRequires:  perl gcc-c++
 BuildRequires:  openssl-devel >= 0.9.8
 BuildRequires:  cyrus-sasl-devel
 BuildRequires:  c-ares-devel
-
-# The following line is necessary because this module
-# is needed for Fedora, but not for EPEL.
-%{?fedora:BuildRequires: perl-ExtUtils-Embed}
+BuildRequires:  perl(ExtUtils::Embed)
 
 %description
 ZNC is an IRC bouncer with many advanced features like detaching,
@@ -43,6 +41,7 @@ Extra modules for ZNC
 
 %prep
 %setup -q
+%patch0 -p1
 %__perl -pi.add_release -e 's|(?<="ZNC \%1\.3f)|-%{release}|' znc.cpp
 chmod -x modules/q.cpp
 
@@ -131,6 +130,10 @@ chmod -x modules/q.cpp
 %{_libdir}/znc/shell.so
 
 %changelog
+* Wed Jun 16 2010 Nick Bebout <nb at fedoraproject.org> - 0.090-2
+- Backport r2026 of ZNC subversion repo to fix bug 603915
+- NULL pointer dereference flaw leads to segfault under certain conditions
+
 * Sun Jun 06 2010 Nick Bebout <nb at fedoraproject.org> - 0.090-1
 - Update to znc 0.090
 



More information about the scm-commits mailing list