Fix ParseElementHeader to support 0 payload elements
Cherry-pick'ing Change 5c83bbec9a5f6f00a349674ddad85b753d2ea219
from upstream. This fixes regression in some edge cases for mkv
playback.
BUG=26499283
Change-Id: I88de03219a3d941b6b2f251d384e29c36bdd4d9b
diff --git a/libwebm/mkvparser.cpp b/libwebm/mkvparser.cpp
index e50322b..651dc8f 100644
--- a/libwebm/mkvparser.cpp
+++ b/libwebm/mkvparser.cpp
@@ -318,7 +318,7 @@
// pos now designates payload
- if (stop >= 0 && pos >= stop)
+ if (stop >= 0 && pos > stop)
return E_FILE_FORMAT_INVALID;
return 0; // success