Commit 3859868c authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: fix integer overflow in mov_read_udta_string()

Found-by: 's avatarPaul Mehta <paul@paulmehta.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent db42d93a
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment