diff options
author | Matt Wolenetz <[email protected]> | 2017-02-08 15:40:46 -0800 |
---|---|---|
committer | Michael Niedermayer <[email protected]> | 2017-05-16 16:00:21 +0200 |
commit | 0abc88f0fdb829a88e0a147a119d1ed59b89a49e (patch) | |
tree | 239ee1e04434d03aeb1a3e69f7f8f4ceff7b7912 | |
parent | b014fa21d4a36eb65e61b530bdafbcdc63d79795 (diff) |
lavf/mov.c: Avoid OOB in mov_read_udta_string()
Core of patch is from [email protected]
Reference https://crbug.com/643952 (udta_string portion)
Signed-off-by: Matt Wolenetz <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
(cherry picked from commit 9bbdf5d921ef57e1698f64981e4ea04db7c56fb5)
Signed-off-by: Michael Niedermayer <[email protected]>
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 268cd2785a..2d9447eda0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -383,11 +383,11 @@ retry: return ret; } else if (!key && c->found_hdlr_mdta && c->meta_keys) { uint32_t index = AV_RB32(&atom.type); - if (index < c->meta_keys_count) { + if (index < c->meta_keys_count && index > 0) { key = c->meta_keys[index]; } else { av_log(c->fc, AV_LOG_WARNING, - "The index of 'data' is out of range: %d >= %d.\n", + "The index of 'data' is out of range: %d < 1 or >= %d.\n", index, c->meta_keys_count); } } |