diff options
author | Michael Niedermayer | 2015-01-06 04:29:10 +0100 |
---|---|---|
committer | Michael Niedermayer | 2015-01-06 04:44:16 +0100 |
commit | 3859868c75313e318ebc5d0d33baada62d45dd75 (patch) | |
tree | 1ee6c9aaa7437bccc00b630c94c5ee645a7030c0 | |
parent | db42d93a61be26873be6115c57f5921b4dfdec14 (diff) |
avformat/mov: fix integer overflow in mov_read_udta_string()
Found-by: Paul Mehta <paul@paulmehta.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index ba79378cd6..f2a66b8a95 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -375,7 +375,7 @@ static int mov_read_udta_string(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (!key) return 0; - if (atom.size < 0) + if (atom.size < 0 || str_size >= INT_MAX/2) return AVERROR_INVALIDDATA; // worst-case requirement for output string in case of utf8 coded input |