From 9cd4d61b65e9b43dc7b33bcbbaec922e1acba20c Mon Sep 17 00:00:00 2001 From: Peter Wagner <​tripolar@gmx.at> Date: Mon, 7 Jan 2013 16:44:58 +0000 Subject: [PATCH] [packages/ctorrent] allow negative integers ... should fix random "error, initial meta info failed" taken from this bugreport: http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959 thanks Norbert Zagyi for the hint SVN-Revision: 35041 --- net/ctorrent/Makefile | 2 +- net/ctorrent/patches/100-negative-ints.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 net/ctorrent/patches/100-negative-ints.patch diff --git a/net/ctorrent/Makefile b/net/ctorrent/Makefile index c8593d91f7..16504e2a34 100644 --- a/net/ctorrent/Makefile +++ b/net/ctorrent/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ctorrent PKG_VERSION:=dnh3.3.2 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/dtorrent \ diff --git a/net/ctorrent/patches/100-negative-ints.patch b/net/ctorrent/patches/100-negative-ints.patch new file mode 100644 index 0000000000..864ce1b697 --- /dev/null +++ b/net/ctorrent/patches/100-negative-ints.patch @@ -0,0 +1,13 @@ +--- a/bencode.cpp ++++ b/bencode.cpp +@@ -44,6 +44,10 @@ size_t buf_long(const char *b,size_t len + p++; len--; + } + ++ if( *p == '-'){ ++ p++; len--; ++ } ++ + for(psave = p; len && isdigit(*p); p++,len--) ; + + if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0; -- 2.30.2