demux/ebml: fix ebml size check

There was one zero too many. Change the limit to 128 MiB with more
readable notation.
This commit is contained in:
Kacper Michajłow 2024-07-09 11:27:26 +02:00
parent daa6068d02
commit 571f9b0f23
1 changed files with 2 additions and 2 deletions

View File

@ -604,8 +604,8 @@ int ebml_read_element(struct stream *s, struct ebml_parse_ctx *ctx,
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");
if (length > (128 << 20)) {
MP_MSG(ctx, msglevel, "Refusing to read element over 128 MiB in size\n");
return -1;
}
ctx->talloc_ctx = talloc_size(NULL, length);