mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
(trunk libT) #4504 "crash when adding malformed magnet link" -- fixed.
This commit is contained in:
parent
4522a3c055
commit
5332d234bb
1 changed files with 2 additions and 2 deletions
|
@ -149,10 +149,10 @@ tr_magnetParse( const char * uri )
|
|||
}
|
||||
}
|
||||
|
||||
if( ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
|
||||
if( ( vallen > 0 ) && ( keylen==2 ) && !memcmp( key, "dn", 2 ) )
|
||||
displayName = tr_http_unescape( val, vallen );
|
||||
|
||||
if( trCount < MAX_TRACKERS ) {
|
||||
if( ( vallen > 0 ) && ( trCount < MAX_TRACKERS ) ) {
|
||||
int i;
|
||||
if( ( keylen==2 ) && !memcmp( key, "tr", 2 ) )
|
||||
tr[trCount++] = tr_http_unescape( val, vallen );
|
||||
|
|
Loading…
Reference in a new issue