1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-24 16:52:39 +00:00

refinement of r2510

This commit is contained in:
Charles Kerr 2007-07-27 01:58:49 +00:00
parent 0e6f766a57
commit cd52d97529

View file

@ -268,13 +268,11 @@ realparse( tr_info_t * inf, const uint8_t * buf, size_t size )
tr_err( "Torrent has no files." );
goto fail;
}
for( i=0; i<inf->fileCount; ++i )
if( !inf->totalSize )
{
if( !inf->files[i].length )
{
tr_err("File #%d, \"%s\" is zero bytes long.", (i+1), inf->files[i].name );
goto fail;
}
tr_err( "Torrent is zero bytes long." );
goto fail;
}
/* TODO add more tests so we don't crash on weird files */