Fix for #6523 - thx Ocman76 :)

This commit is contained in:
niksedk 2022-12-16 21:03:38 +01:00
parent fa733c5232
commit 0fdac1254e

View File

@ -43,6 +43,16 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
var text1 = encoding.GetString(bytes, index, 31);
var text2 = encoding.GetString(bytes, index + 31 + 2, 31);
var timeString = encoding.GetString(bytes, index + 64, 7);
if (text1.Contains('\u0000') || timeString.Contains('\u0000'))
{
_errorCount++;
if (_errorCount > 10)
{
return;
}
}
if (int.TryParse(timeString, NumberStyles.None, CultureInfo.InvariantCulture, out var number))
{
var ms = number;