summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
authorerdgeist <>2007-10-23 00:39:21 +0000
committererdgeist <>2007-10-23 00:39:21 +0000
commitab9246618b1d369cdba1140135dedb8affc5485e (patch)
treecf17f7cf4d164677597f1a4502f27ad8dfb48919 /opentracker.c
parent1fce733ea0037d67fd07d6738bed92da3ae7c81a (diff)
some clients chose to accidently send negative numwants
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/opentracker.c b/opentracker.c
index 41df0ee..cfa051a 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -511,6 +511,7 @@ ANNOUNCE_WORKAROUND:
511 if(!byte_diff(data,7,"numwant")) { 511 if(!byte_diff(data,7,"numwant")) {
512 len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ); 512 len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE );
513 if( ( len <= 0 ) || scan_fixed_int( data, len, &numwant ) ) HTTPERROR_400_PARAM; 513 if( ( len <= 0 ) || scan_fixed_int( data, len, &numwant ) ) HTTPERROR_400_PARAM;
514 if( numwant < 0 ) numwant = 50;
514 if( numwant > 200 ) numwant = 200; 515 if( numwant > 200 ) numwant = 200;
515 } else if(!byte_diff(data,7,"compact")) { 516 } else if(!byte_diff(data,7,"compact")) {
516 len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE ); 517 len = scan_urlencoded_query( &c, data = c, SCAN_SEARCHPATH_VALUE );