Date: Thu, 21 Jun 2012 07:34:19 +0200 (CEST) From: dirk.meyer@dinoex.sub.org To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/169283: [PATCH] net-p2p/ctorrent bugfix initial meta info failed Message-ID: <201206210534.q5L5YJdU059443@home8.dinoex.sub.de> Resent-Message-ID: <201206210540.q5L5e4Hi093124@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 169283 >Category: ports >Synopsis: [PATCH] net-p2p/ctorrent bugfix initial meta info failed >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 21 05:40:03 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Dirk Meyer >Release: FreeBSD 9.0-RELEASE >Organization: privat >Environment: Any FreeBSD >Description: try to decode a torrent with multiple files. ctorrent fails quite often do decode such. "error, initial meta info failed." >How-To-Repeat: ctorrent -c Batch.torrent >Fix: I tried this patch from the SF bugs: http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959 I modified the patch slightly to git the freeBSD port. with the patch applied I can decodede the torrent files. Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net-p2p/ctorrent/Makefile,v retrieving revision 1.24 diff -u -r1.24 Makefile --- Makefile 22 Feb 2010 19:02:37 -0000 1.24 +++ Makefile 21 Jun 2012 05:16:12 -0000 @@ -7,7 +7,7 @@ PORTNAME= ctorrent PORTVERSION= 3.3.2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-p2p MASTER_SITES= http://www.rahul.net/dholmes/ctorrent/ DISTNAME= ${PORTNAME}-dnh${PORTVERSION} Index: files/patch-negative-ints =================================================================== RCS file: files/patch-negative-ints diff -N files/patch-negative-ints --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-negative-ints 21 Jun 2012 05:16:12 -0000 @@ -0,0 +1,15 @@ +allow negative integers ... should fix random "error, initial meta info failed" + +--- bencode.cpp.orig ++++ bencode.cpp +@@ -44,6 +44,10 @@ + 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; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206210534.q5L5YJdU059443>