From ff7ef0be2bbb5bb75564c7dbb1faf12dd2e431e2 Mon Sep 17 00:00:00 2001 From: jogo Date: Mon, 25 Feb 2013 12:45:48 +0000 Subject: [PATCH] AA: [packages/ctorrent] allow negative integers ... should fix random "error, initial meta info failed" Backport of r35041. git-svn-id: svn://svn.openwrt.org/openwrt/branches/packages_12.09@35771 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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 c8593d9..16504e2 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 0000000..864ce1b --- /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.11.0