mirror of
https://github.com/transmission/transmission
synced 2025-02-02 20:43:51 +00:00
(trunk libT) #2284: crashes when some invalid torrents are added. reported by Flemzard in irc
This commit is contained in:
parent
75584d81ac
commit
44d785f9ca
1 changed files with 3 additions and 0 deletions
|
@ -720,6 +720,9 @@ tr_torrentParse( const tr_ctor * ctor, tr_info * setmeInfo )
|
|||
didParse = tr_metainfoParse( session, setmeInfo, metainfo );
|
||||
doFree = didParse && ( setmeInfo == &tmp );
|
||||
|
||||
if( !didParse )
|
||||
result = TR_PARSE_ERR;
|
||||
|
||||
if( didParse && !getBlockSize( setmeInfo->pieceSize ) )
|
||||
result = TR_PARSE_ERR;
|
||||
|
||||
|
|
Loading…
Reference in a new issue