diff options
author | Michael Niedermayer <[email protected]> | 2015-01-06 04:29:10 +0100 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2015-01-06 05:49:18 +0100 |
commit | b6351f9978a4188dfc5213a863b8c08308f6fec8 (patch) | |
tree | e1787fca4eb62f25646fab8a2950a75ba65ad9ac | |
parent | 07f634f9487615b0587cd4a1bef8f537b833384d (diff) |
avformat/mov: fix integer overflow in mov_read_udta_string()
Found-by: Paul Mehta <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 3859868c75313e318ebc5d0d33baada62d45dd75)
Signed-off-by: Michael Niedermayer <[email protected]>
-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 03a36a8fa5..b6449f334c 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -388,7 +388,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); |