diff --git a/library/includes/functions_torrent.php b/library/includes/functions_torrent.php index 890841f8..e91bc6bc 100644 --- a/library/includes/functions_torrent.php +++ b/library/includes/functions_torrent.php @@ -326,9 +326,13 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE // Exclude padding files [Only for hybrid torrents] if ((isset($f['attr']) ? $f['attr'] : null) !== 'p') { - $totallen += (float) $f['length']; + $totallen += (isset($f['length']) && is_numeric($f['length'])) ? (float) $f['length'] : 'invalid_size'; } } + if ($totallen === 'invalid_size') + { + torrent_error_exit($lang['TORFILE_INVALID']); + } } else {