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:
-rw-r--r--libavformat/mxfdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index b85c10bf19..d7cdd22c8a 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -932,7 +932,13 @@ static int mxf_read_cryptographic_context(void *arg, AVIOContext *pb, int tag, i
static int mxf_read_strong_ref_array(AVIOContext *pb, UID **refs, int *count)
{
- *count = avio_rb32(pb);
+ unsigned c = avio_rb32(pb);
+
+ //avio_read() used int
+ if (c > INT_MAX / sizeof(UID))
+ return AVERROR_PATCHWELCOME;
+ *count = c;
+
av_free(*refs);
*refs = av_calloc(*count, sizeof(UID));
if (!*refs) {