diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 04:29:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-06 05:49:02 +0100 |
commit | 20a03d5c93237341e15e5279fa9190a2f79bc75f (patch) | |
tree | bcdeb52905744d1b614a9e56bdf35b6a4f3040a9 | |
parent | 57710c3646d4e0edb9e66ecf059d29df172a4187 (diff) | |
download | ffmpeg-20a03d5c93237341e15e5279fa9190a2f79bc75f.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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 0d4017b5b3..027becfe62 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -386,7 +386,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); |