Browse Source

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 3859868c75)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.6
Michael Niedermayer 11 years ago
parent
commit
0787163cf3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

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


Loading…
Cancel
Save