Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-p2p/ctorrent/files: ctorrent-3.3.2-negative-ints.patch
Date: Sun, 16 Jan 2011 01:15:58
Message-Id: 20110116011549.9B15020057@flycatcher.gentoo.org
1 vapier 11/01/16 01:15:49
2
3 Added: ctorrent-3.3.2-negative-ints.patch
4 Log:
5 Update to EAPI 2 and fix parsing of torrents with negative ints.
6
7 (Portage version: 2.2.0_alpha13/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ctorrent/files/ctorrent-3.3.2-negative-ints.patch?rev=1.1&content-type=text/plain
14
15 Index: ctorrent-3.3.2-negative-ints.patch
16 ===================================================================
17 allow negative integers ... should fix random "error, initial meta info failed"
18
19 https://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959
20
21 --- ctorrent-dnh3.3.2/bencode.cpp
22 +++ ctorrent-dnh3.3.2/bencode.cpp
23 @@ -44,6 +44,10 @@
24 p++; len--;
25 }
26
27 + if( *p == '-'){
28 + p++; len--;
29 + }
30 +
31 for(psave = p; len && isdigit(*p); p++,len--) ;
32
33 if(!len || MAX_INT_SIZ < (p - psave) || *p != endchar) return 0;