Fix crash when reading json

This commit is contained in:
niksedk 2021-11-27 13:27:31 +01:00
parent cf3138f4f0
commit 5a99440969

View File

@ -157,6 +157,11 @@ namespace Nikse.SubtitleEdit.Core.SubtitleFormats
return null;
}
if (startIndex + 3 + tag.Length > s.Length)
{
return null;
}
var res = s.Substring(startIndex + 3 + tag.Length).Trim().TrimStart(':').TrimStart();
if (res.StartsWith('"'))
{ // text