packages: znc: fix crash in bouncedcc module
authorJonas Gorski <jogo@openwrt.org>
Fri, 13 Jan 2012 12:03:47 +0000 (12:03 +0000)
committerJonas Gorski <jogo@openwrt.org>
Fri, 13 Jan 2012 12:03:47 +0000 (12:03 +0000)
Add upstream fix for CVE-2012-0033.

SVN-Revision: 29724

net/znc/Makefile
net/znc/patches/004-fix_bouncedcc_crash.patch [new file with mode: 0644]

index a820f2286d42e0bfa7c92322b692a5483963c88b..36b3effcc81163c9200fc14a12815dbdbda57ece 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=znc
 PKG_VERSION:=0.202
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://znc.in/releases \
diff --git a/net/znc/patches/004-fix_bouncedcc_crash.patch b/net/znc/patches/004-fix_bouncedcc_crash.patch
new file mode 100644 (file)
index 0000000..20e3a12
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/modules/bouncedcc.cpp
++++ b/modules/bouncedcc.cpp
+@@ -238,7 +238,7 @@ class CBounceDCCMod : public CModule {
+                                       CDCCBounce* pSock = (CDCCBounce*) *it;
+                                       if (pSock->GetLocalPort() == uResumePort) {
+-                                              m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
++                                              m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetUserPort()) + " " + sMessage.Token(4) + "\001");
+                                       }
+                               }
+                       } else if (sType.Equals("ACCEPT")) {
+@@ -248,7 +248,7 @@ class CBounceDCCMod : public CModule {
+                                       CDCCBounce* pSock = (CDCCBounce*) *it;
+                                       if (pSock->GetUserPort() == sMessage.Token(3).ToUShort()) {
+-                                              m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pClient->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
++                                              m_pUser->PutUser(":" + Nick.GetNickMask() + " PRIVMSG " + m_pUser->GetNick() + " :\001DCC " + sType + " " + sFile + " " + CString(pSock->GetLocalPort()) + " " + sMessage.Token(4) + "\001");
+                                       }
+                               }
+                       }