1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-12 07:27:57 +00:00
freebsd-ports/net-p2p/ctorrent/files/patch-negative-ints
Dirk Meyer c1ad24bc7b - fix negative int bug
- take maintainership
PR:		169283
Submitted by:	dinoex
Approved by:	flz
Obtained from:	http://sourceforge.net/tracker/?func=detail&aid=3159066&group_id=202532&atid=981959
2013-06-11 04:44:18 +00:00

16 lines
325 B
Plaintext

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;