aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-06 04:29:10 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-09 17:18:40 +0100
commit0787163cf369f114862bc7402b8410ff32bdef37 (patch)
tree6977b7fdb5e5312cfdd3c11f7c758eea3407419d /libavformat
parent134ff88c6a80672a108c607d8df459f401560d3c (diff)
downloadffmpeg-0787163cf369f114862bc7402b8410ff32bdef37.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>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f78680a0e9..98eb5ccbd6 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -358,7 +358,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);