mirror of
https://github.com/transmission/transmission
synced 2024-12-24 08:43:27 +00:00
(trunk libT) #2965: "buffer overflow if too many tr= args in a magnet link" -- fixed in trunk for 1.92. thanks to pjz for the patch.
This commit is contained in:
parent
91ee0ae3a5
commit
4401dcaa28
1 changed files with 2 additions and 2 deletions
|
@ -151,10 +151,10 @@ tr_magnetParse( const char * uri )
|
|||
if( ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
|
||||
displayName = tr_http_unescape( val, vallen );
|
||||
|
||||
if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
|
||||
if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) && ( trCount < MAX_TRACKERS ) )
|
||||
tr[trCount++] = tr_http_unescape( val, vallen );
|
||||
|
||||
if( ( keylen==2 ) && !memcmp( key, "ws", 2 ) )
|
||||
if( ( keylen==2 ) && !memcmp( key, "ws", 2 ) && ( wsCount < MAX_TRACKERS ) )
|
||||
ws[wsCount++] = tr_http_unescape( val, vallen );
|
||||
|
||||
walk = next != NULL ? next + 1 : NULL;
|
||||
|
|
Loading…
Reference in a new issue