1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-15 16:29:34 +00:00

Check for zero-length torrent name after stripping slashes.

This commit is contained in:
Josh Elsasser 2007-03-05 00:18:05 +00:00
parent 41a81769e3
commit 2e65e41d75

View file

@ -215,6 +215,11 @@ int tr_metainfoParse( tr_info_t * inf, const char * path,
goto fail;
}
strcatUTF8( inf->name, sizeof( inf->name ), val->val.s.s, 1 );
if( '\0' == inf->name[0] )
{
tr_err( "Invalid \"name\" string" );
goto fail;
}
inf->totalSize = 0;
if( ( list = tr_bencDictFind( beInfo, "files" ) ) )