From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 21 05:40:04 2012 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F41A1065670 for ; Thu, 21 Jun 2012 05:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1D38FC14 for ; Thu, 21 Jun 2012 05:40:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q5L5e4k3093125 for ; Thu, 21 Jun 2012 05:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q5L5e4Hi093124; Thu, 21 Jun 2012 05:40:04 GMT (envelope-from gnats) Resent-Date: Thu, 21 Jun 2012 05:40:04 GMT Resent-Message-Id: <201206210540.q5L5e4Hi093124@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, dirk.meyer@dinoex.sub.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C121065673 for ; Thu, 21 Jun 2012 05:35:34 +0000 (UTC) (envelope-from dm@home8.dinoex.sub.de) Received: from uucp.dinoex.sub.de (uucp.dinoex.sub.de [194.45.71.2]) by mx1.freebsd.org (Postfix) with ESMTP id E91488FC14 for ; Thu, 21 Jun 2012 05:35:33 +0000 (UTC) Received: from home8.dinoex.sub.de (home8.dinoex.sub.de [194.45.71.48]) by uucp.dinoex.sub.de (8.14.4/8.14.4) with ESMTP id q5L5Z8il028528 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Jun 2012 07:35:24 +0200 (CEST) (envelope-from dm@home8.dinoex.sub.de) Received: (from dm@localhost) by home8.dinoex.sub.de (8.14.5/8.14.5/Submit) id q5L5YJdU059443; Thu, 21 Jun 2012 07:34:19 +0200 (CEST) (envelope-from dm) Message-Id: <201206210534.q5L5YJdU059443@home8.dinoex.sub.de> Date: Thu, 21 Jun 2012 07:34:19 +0200 (CEST) From: dirk.meyer@dinoex.sub.org To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/169283: [PATCH] net-p2p/ctorrent bugfix initial meta info failed X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dirk.meyer@dinoex.sub.org List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 05:40:04 -0000 >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: