diff --git a/libtransmission/magnet.c b/libtransmission/magnet.c index e3c4bd6cb..7cd21ae8d 100644 --- a/libtransmission/magnet.c +++ b/libtransmission/magnet.c @@ -160,7 +160,7 @@ tr_magnetParse( const char * uri ) tr[trCount++] = tr_http_unescape( val, vallen ); } - if( ( keylen==2 ) && !memcmp( key, "ws", 2 ) && ( wsCount < MAX_TRACKERS ) ) + if( ( vallen > 0 ) && ( keylen==2 ) && !memcmp( key, "ws", 2 ) && ( wsCount < MAX_WEBSEEDS ) ) ws[wsCount++] = tr_http_unescape( val, vallen ); walk = next != NULL ? next + 1 : NULL;