mirror of https://github.com/mpv-player/mpv
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:
parent
daa6068d02
commit
571f9b0f23
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue