Return zero bytes when MatroskaFile asks for data past the end of the file

This commit is contained in:
Thomas Goyne 2014-05-20 08:41:52 -07:00
parent 53f02d33a6
commit 5f4d6ad386
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ struct MkvStdIO final : InputStream {
static int Read(InputStream *st, uint64_t pos, void *buffer, int count) {
auto *self = static_cast<MkvStdIO*>(st);
if (pos == self->file.size())
if (pos >= self->file.size())
return 0;
auto remaining = self->file.size() - pos;