summaryrefslogtreecommitdiffstats
path: root/demux/ebml.c
diff options
context:
space:
mode:
Diffstat (limited to 'demux/ebml.c')
-rw-r--r--demux/ebml.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/demux/ebml.c b/demux/ebml.c
index 5f1ed37415..dbdc5e26ea 100644
--- a/demux/ebml.c
+++ b/demux/ebml.c
@@ -631,6 +631,10 @@ int ebml_read_element(struct stream *s, struct ebml_parse_ctx *ctx,
"- partial or corrupt file?\n");
return -1;
}
+ if (length == EBML_UINT_INVALID) {
+ MP_MSG(ctx, msglevel, "EBML element with unknown length - unsupported\n");
+ return -1;
+ }
if (length > 1000000000) {
MP_MSG(ctx, msglevel, "Refusing to read element over 100 MB in size\n");
return -1;