allow negative integers ... should fix random "error, initial meta info failed"
authorPeter Wagner <​tripolar@gmx.at>
Mon, 7 Jan 2013 16:44:58 +0000 (16:44 +0000)
committerPeter Wagner <​tripolar@gmx.at>
Mon, 7 Jan 2013 16:44:58 +0000 (16:44 +0000)
taken from this bugreport:
http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959

thanks Norbert Zagyi <znorbi@znorbi.net> for the hint

SVN-Revision: 35041

net/ctorrent/Makefile
net/ctorrent/patches/100-negative-ints.patch [new file with mode: 0644]

index c8593d91f749efccfa32d5894dea3a3a43249b78..16504e2a34b24d19311e2b72de5dced30275bd3f 100644 (file)
@@ -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 (file)
index 0000000..864ce1b
--- /dev/null
@@ -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;