summaryrefslogtreecommitdiffstats
path: root/stream/stream.c
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2023-12-13 18:43:30 +0100
committerDudemanguy <random342@airmail.cc>2024-01-31 15:38:21 +0000
commita59b8edb96cbadbf61f30ec563bddee7701d984a (patch)
tree8e68a7c82fcf879449a85d220a57e9f00cb9456e /stream/stream.c
parentd90a5ff17a88cbda2ac64cccf1cd98456f2d0ab2 (diff)
downloadmpv-a59b8edb96cbadbf61f30ec563bddee7701d984a.tar.bz2
mpv-a59b8edb96cbadbf61f30ec563bddee7701d984a.tar.xz
stream: increase max_size to INT_MAX minus padding
No need to magic number limit, we can support up to INT_MAX with current code. Which should be more than enough.
Diffstat (limited to 'stream/stream.c')
-rw-r--r--stream/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stream/stream.c b/stream/stream.c
index dd67825dd5..43a7f51a60 100644
--- a/stream/stream.c
+++ b/stream/stream.c
@@ -803,7 +803,7 @@ int stream_skip_bom(struct stream *s)
struct bstr stream_read_complete(struct stream *s, void *talloc_ctx,
int max_size)
{
- if (max_size > 1000000000)
+ if (max_size <= 0 || max_size > STREAM_MAX_READ_SIZE)
abort();
int bufsize;