Merge pull request #11 from Matroska-Org/eof-in-sizes
detect EOF when reading the element size
This commit is contained in:
commit
04b34b0dbd
@ -417,7 +417,10 @@ EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSe
|
||||
bFound = false;
|
||||
break;
|
||||
}
|
||||
ReadSize += DataStream.read(&PossibleIdNSize[SizeIdx++], 1);
|
||||
if( DataStream.read( &PossibleIdNSize[SizeIdx++], 1 ) == 0 ) {
|
||||
return NULL; // no more data ?
|
||||
}
|
||||
ReadSize++;
|
||||
PossibleSizeLength++;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user