WriterTest: Fix bounds check

Because of 0-based indexing, we need to make sure the index is
not equal to the number of elements in the array.

Test: TreeHugger
Change-Id: I9662d4a67cdfebb0c890c65a35a2456cd3af001b
gugelfrei
Greg Kaiser 5 years ago
parent bcb857727f
commit 8dc1c72703

@ -234,7 +234,7 @@ int32_t WriterTest::addWriterSource(bool isAudio, configFormat params) {
void getFileDetails(string &inputFilePath, string &info, configFormat &params, bool &isAudio,
int32_t streamIndex = 0) {
if (streamIndex > sizeof(kInputData) / sizeof(kInputData[0])) {
if (streamIndex >= sizeof(kInputData) / sizeof(kInputData[0])) {
return;
}
inputFilePath += kInputData[streamIndex].inputFile;

Loading…
Cancel
Save