Browse Source

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

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2
Michael Niedermayer 8 years ago
parent
commit
fecb3e82a4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mxfdec.c

+ 1
- 1
libavformat/mxfdec.c View File

@@ -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;


Loading…
Cancel
Save