1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 01:27:28 +00:00

#1186: crash by maliciously-crafted .torrent files w/piece length of zero

This commit is contained in:
Charles Kerr 2008-08-13 14:19:25 +00:00
parent d521734c8d
commit dd51caee94

View file

@ -411,7 +411,7 @@ tr_metainfoParse( const tr_handle * handle,
goto fail;
}
if( !inf->fileCount || !inf->totalSize )
if( !inf->fileCount || !inf->totalSize || !inf->pieceSize )
{
tr_nerr( inf->name, _( "Torrent is corrupt" ) ); /* the content is missing! */
goto fail;