diff options
author | Tim Harder <radhermit@gentoo.org> | 2012-11-02 06:15:57 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2012-11-02 06:15:57 +0000 |
commit | 9f2e9c2569bb8f0f58957315b490fffb2bd4661a (patch) | |
tree | 4d62bdb7f0e83cd99ef900820f144cb343a5312d /net-nntp/nzbget/files | |
parent | bump, remove old (diff) | |
download | gentoo-2-9f2e9c2569bb8f0f58957315b490fffb2bd4661a.tar.gz gentoo-2-9f2e9c2569bb8f0f58957315b490fffb2bd4661a.tar.bz2 gentoo-2-9f2e9c2569bb8f0f58957315b490fffb2bd4661a.zip |
Version bump to development release. Fix potential buffer overflows (bug #434264), change from /var/run to /run, remove need
(Portage version: 2.2.0_alpha141/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'net-nntp/nzbget/files')
-rw-r--r-- | net-nntp/nzbget/files/nzbget-9.0_pre477-buffer-overflows.patch | 42 | ||||
-rw-r--r-- | net-nntp/nzbget/files/nzbget-9.0_pre477-header.patch | 11 | ||||
-rw-r--r-- | net-nntp/nzbget/files/nzbget.initd | 8 |
3 files changed, 55 insertions, 6 deletions
diff --git a/net-nntp/nzbget/files/nzbget-9.0_pre477-buffer-overflows.patch b/net-nntp/nzbget/files/nzbget-9.0_pre477-buffer-overflows.patch new file mode 100644 index 000000000000..ca26fc141bc2 --- /dev/null +++ b/net-nntp/nzbget/files/nzbget-9.0_pre477-buffer-overflows.patch @@ -0,0 +1,42 @@ +--- nzbget-9.0-testing/RemoteClient.cpp ++++ nzbget-9.0-testing/RemoteClient.cpp +@@ -541,20 +541,20 @@ + { + if (szParameters[0] == '\0') + { +- strncat(szParameters, " (", 1024); ++ strncat(szParameters, " (", sizeof(szParameters) - strlen(szParameters) - 1); + } + else + { +- strncat(szParameters, ", ", 1024); ++ strncat(szParameters, ", ", sizeof(szParameters) - strlen(szParameters) - 1); + } + NZBParameter* pNZBParameter = *it; +- strncat(szParameters, pNZBParameter->GetName(), 1024); +- strncat(szParameters, "=", 1024); +- strncat(szParameters, pNZBParameter->GetValue(), 1024); ++ strncat(szParameters, pNZBParameter->GetName(), sizeof(szParameters) - strlen(szParameters) - 1); ++ strncat(szParameters, "=", sizeof(szParameters) - strlen(szParameters) - 1); ++ strncat(szParameters, pNZBParameter->GetValue(), sizeof(szParameters) - strlen(szParameters) - 1); + } + if (szParameters[0] != '\0') + { +- strncat(szParameters, ")", 1024); ++ strncat(szParameters, ")", sizeof(szParameters) - strlen(szParameters) - 1); + } + + if (!szPattern || ((MatchedNZBInfo*)pGroupInfo->GetNZBInfo())->m_bMatch) +@@ -672,10 +672,10 @@ + + if (ntohl(ListResponse.m_iPostJobCount) > 0 || ntohl(ListResponse.m_bPostPaused)) + { +- strncat(szServerState, strlen(szServerState) > 0 ? ", Post-Processing" : "Post-Processing", sizeof(szServerState)); ++ strncat(szServerState, strlen(szServerState) > 0 ? ", Post-Processing" : "Post-Processing", sizeof(szServerState) - strlen(szServerState) - 1); + if (ntohl(ListResponse.m_bPostPaused)) + { +- strncat(szServerState, " paused", sizeof(szServerState)); ++ strncat(szServerState, " paused", sizeof(szServerState) - strlen(szServerState) - 1); + } + } + diff --git a/net-nntp/nzbget/files/nzbget-9.0_pre477-header.patch b/net-nntp/nzbget/files/nzbget-9.0_pre477-header.patch new file mode 100644 index 000000000000..e60dd9f1a6f7 --- /dev/null +++ b/net-nntp/nzbget/files/nzbget-9.0_pre477-header.patch @@ -0,0 +1,11 @@ +--- nzbget-9.0-testing/Scanner.cpp ++++ nzbget-9.0-testing/Scanner.cpp +@@ -36,6 +36,8 @@ + #include <fstream> + #ifdef WIN32 + #include <direct.h> ++#else ++#include <unistd.h> + #endif + #include <sys/stat.h> + #include <errno.h> diff --git a/net-nntp/nzbget/files/nzbget.initd b/net-nntp/nzbget/files/nzbget.initd index 8d984ccc7ce5..22a6450dbacf 100644 --- a/net-nntp/nzbget/files/nzbget.initd +++ b/net-nntp/nzbget/files/nzbget.initd @@ -1,14 +1,10 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/files/nzbget.initd,v 1.3 2011/12/25 07:42:35 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-nntp/nzbget/files/nzbget.initd,v 1.4 2012/11/02 06:15:57 radhermit Exp $ extra_started_commands="pause unpause" -depend() { - need net -} - start() { ebegin "Starting nzbget" start-stop-daemon --quiet --start --user "${NZBGET_USER}" \ |