aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-06 04:29:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-06 18:28:35 +0100
commitffe915b6f596de5fc54eabf631b7b9b1a19aaa63 (patch)
treeed9fe5591bb4895d2780170be7a1cbcce8c0f2bf
parent22558d6f6e8652d362add0c5c195964c5e65cfd2 (diff)
downloadffmpeg-ffe915b6f596de5fc54eabf631b7b9b1a19aaa63.tar.gz
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> (cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3711d2932e..d7e5669c8e 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -359,7 +359,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;
str_size = FFMIN3(sizeof(str)-1, str_size, atom.size);