Skip to content

Commit

Permalink
demux/ebml: fix ebml size check
Browse files Browse the repository at this point in the history
There was one zero too many. Change the limit to 128 MiB with more
readable notation.
  • Loading branch information
kasper93 committed Jul 9, 2024
1 parent daa6068 commit 571f9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions demux/ebml.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 571f9b0

Please sign in to comment.