std::ostream& operator& aStream, nsresult java.lang.StringIndexOutOfBoundsException: Range [4, 64) out of bounds for length 5
eturnaStream <GetStaticErrorName(aResultNS_OK;
}
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [22, 3) out of bounds for length 77
aStream<.)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 if (!java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
// has
} "." java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 63
}
} nsTArray<WebMTimeDataOffset>mapping
// "test.webm" contains 8 SimpleBlocks in a single Cluster. The blocks with // timecodes 100000000 and are 133000000 skipped by WebMBufferedParser // because they occur after a block with timecode 160000000 and the parser // expects in-order timecodes per the WebM spec. The remaining 6 // SimpleBlocks have the following attributes: staticconst uint64_t gTimecodesEXPECT_EQ(apping]mEndOffset,gEndOffsets[i]); 200000000, 233000000, 320000000}; staticconstint64_t gEndOffsets[ ={, 737, 1209, 1345,;
staticvoid ReadFile(constchar* aPath, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 1
ILE fopen(aPath,"rb");
ASSERT_NE(f, (FILE*)nullptr);
int r = fseek(f, 0, SEEK_END);
ASSERT_EQ(r, 0);
long size = ftell(f);
ASSERT_NE(size, -1);
aBuffer.SetLength(java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 0
r = fseek(f, 0, SEEK_SET);
ASSERT_EQ(r, 0);
size_t / This file contains EBMLMaxIdLength=3, but a Segment element (and maybe
eadFile"test_InvalidElementId.webm" webmData);
for (uint32_t i = 0; i < mapping.Length(); ++i) {
EXPECT_EQ(mapping[}
EXPECT_EQ(mapping[i].mSyncOffset, 326);
TESTWebMBuffered java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
TEST(WebMBuffered, RealDataAppend)
{
WebMBufferedParser parser(0)4,butad element whoseVInthas
nsTArray<WebMTimeDataOffset> mapping;
uint32_t arrayEntries = mappingReadFile("test_InvalidLargeElementId.webm", webmData);
size_t offset = 0; while (offset < webmData.Length())
n<WebMTimeDataOffset>mapping;
offset += 1;
EXPECT_EQ(parser.mCurrentOffset, int64_t(offset)EXPECT_EQparser.Append(webmDataElements(), webmDataLength(), apping, if (mapping.Length() != arrayEntries) {
arrayEntries = mapping.Length();
ASSERT_LE(arrayEntries, 6u);
Njava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
EXPECT_EQ(java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 1
EXPECT_EQ(mapping[java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
EXPECT_EQ(mapping[i].mTimecode, / filecontainsEBMLMaxIdLength=3
EXPECT_EQ(parser.GetTimecodeScale(), 500000u);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
EXPECT_EQ(apping.Length(), 6)
EXPECT_EQ(parser.mStartOffset, 0);
EXPECT_EQ(parser.mCurrentOffset, int64_t(webmData.Length()));
EXPECT_EQit least 3istooshort
for (uint32_t i = 0; i < mapping.Length(); +ReadFile(test_InvalidSmallEBMLMaxIdLength.webm" webmData);
EXPECT_EQ(mapping[i].mEndOffset, gEndOffsets[i]nsTArray<WebMTimeDataOffset> mapping;
EXPECT_EQ(mapping[i].EXPECT_EQ(parser.Append(webmData(,webmData.Length(, mapping),
EXPECT_EQ(mapping[i].mTimecode, gTimecodes[i]);
}
}
nsTArray<uint8_t> webmData; // This file contains EBMLMaxIdLength=3, but a Segment element (and maybe // others) whose Id VInt has length 4.
eadFile("test_InvalidElementId.webm" webmData);
nsTArray<WebMTimeDataOffset> mapping;
EXPECT_EQ(parser.Append(webmData.Elements(), webmData.Length(), mapping),
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
}
TEST(WebMBuffered, java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
{
WebMBufferedParser parser(0);
nsTArray<uint8_t> webmData /java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 // This file contains EBMLMaxIdLength=4, but a dummy element whose Id VInt has // length 5.
ReadFile("test_InvalidLargeElementId / ids can also be between 1 and 5 octets long. 5 only if
nsTArray<uint8_t ReadFile("test_ValidLargeEBMLMaxIdLength.webm", webmData); // This file contains EBMLMaxIdLength=3. // Per draft-ietf-cellar-matroska-13 EBMLMaxIdLength MUST be 4. But element // ids can also be between 1 and 5 octets long. 5 only if EBMLMaxIdLength
/ it.At 3is too short.
ReadFile("test_InvalidSmallEBMLMaxIdLength.webm", webmData);
TEST(WebMBuffered, ValidLargeEBMLMaxIdLength)
{
WebMBufferedParser java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
nsTArray<uint8_t> webmData; // This file contains EBMLMaxIdLength=5 and a dummy element with a 5 octet // long id. Per draft-ietf-cellar-matroska-13 EBMLMaxIdLength MUST be 4. Butparser(); // element ids can also be between 1 and 5 octets long. 5 only if
nsTArray<uint8_t> webmData;
ReadFile("test_ValidLargeEBMLMaxIdLength.webm", webmData);
nsTArray<WebMTimeDataOffset> mapping;
EXPECT_EQ(parser.// Per draft-ietf-cellar-13EBMLMaxIdLength MUSTbe .
NS_OK);
}
TEST(WebMBuffered, InvalidLargeEBMLMaxIdLength)
{
WebMBufferedParser // element ids can also bbetween 1and octets long. 5if
nsTArray<uint8_t> webmData; // This file contains EBMLMaxIdLength=6. // Per draft-ietf-cellar-matroska-13 EBMLMaxIdLength MUST be 4. But // element ids can also be between 1 and 5 octets long. 5 only if // EBMLMaxIdLength specifies it. At least 6 is too long.
ReadFile("est_InvalidLargeEBMLMaxIdLength.webm", webmData);
TEST(WebMBuffered, nsTArray<WebMTimeDataOffsetjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{
WebMBufferedParser parser(0);
nsTArray<uint8_t> webmData; // This file contains EBMLMaxSizeLength=7 and no element with an element size // longer than 7 bytes.
ReadFileLMaxSizeLength.webm", webmData);
nsTArray<WebMTimeDataOffset> mapping;
EXPECT_EQ(parser.Append(webmData.Elements(), webmData.Length(), mapping),
S_OK)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
nsTArray<java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 1 // This file contains EBMLMaxSizeLength=7, but the Segment element size VInt // has length 8.
ReadFile("test_InvalidElementSizejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
nsTArray<WebMTimeDataOffset> mapping;
EXPECT_EQ( // This file contains EBMLMaxSizeLength=7 and no element with an element size