Merge pull request #1892 from ivandrofly/dvdsubrip

[DvdSubRip] - Fix possible 'index-out-range' cause.
This commit is contained in:
Nikolaj Olsson 2016-08-10 06:03:13 +02:00 committed by GitHub
commit e11729ccbf

View File

@ -357,7 +357,7 @@ namespace Nikse.SubtitleEdit.Forms
internal static bool IsPrivateStream2(byte[] buffer, int index) internal static bool IsPrivateStream2(byte[] buffer, int index)
{ {
return buffer.Length >= index + 3 && return buffer.Length > index + 3 &&
buffer[index + 0] == 0 && buffer[index + 0] == 0 &&
buffer[index + 1] == 0 && buffer[index + 1] == 0 &&
buffer[index + 2] == 1 && buffer[index + 2] == 1 &&