Commit fecb3e82 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mxfdec: Check size to avoid integer overflow in mxf_read_utf16_string()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c495f4ff
......@@ -717,7 +717,7 @@ static inline int mxf_read_utf16_string(AVIOContext *pb, int size, char** str, i
int ret;
size_t buf_size;
if (size < 0)
if (size < 0 || size > INT_MAX/2)
return AVERROR(EINVAL);
buf_size = size + size / 2 + 1;
......
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