Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2022-09-21 19:23:30 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2022-10-09 22:33:06 +0300
commitb6b9c173e0594d89e30a7d5e912d7291ee2bc1b6 (patch)
treefed25bf3b496dad0a65f8259bd8e817db189ac2a
parentc75a0b98f88a6613b85d91291b77ac4a268b4856 (diff)
avformat/mxfdec: only probe max run in
Suggested-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 1182bbb2c3226260ed672920251e3410bde8c6c9) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index d8f9fc91ba..4152d035e0 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3617,7 +3617,7 @@ static int mxf_read_close(AVFormatContext *s)
static int mxf_probe(const AVProbeData *p) {
const uint8_t *bufp = p->buf;
- const uint8_t *end = p->buf + p->buf_size;
+ const uint8_t *end = p->buf + FFMIN(p->buf_size, RUN_IN_MAX + 1 + sizeof(mxf_header_partition_pack_key));
if (p->buf_size < sizeof(mxf_header_partition_pack_key))
return 0;