mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-03 05:10:03 +02:00
lavf/mov.c: Avoid OOB in mov_read_udta_string()
Core of patch is from paul@paulmehta.com Reference https://crbug.com/643952 (udta_string portion) Signed-off-by: Matt Wolenetz <wolenetz@chromium.org> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
ce6e7a2db1
commit
9bbdf5d921
@ -407,11 +407,11 @@ retry:
|
|||||||
return ret;
|
return ret;
|
||||||
} else if (!key && c->found_hdlr_mdta && c->meta_keys) {
|
} else if (!key && c->found_hdlr_mdta && c->meta_keys) {
|
||||||
uint32_t index = AV_RB32(&atom.type);
|
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];
|
key = c->meta_keys[index];
|
||||||
} else {
|
} else {
|
||||||
av_log(c->fc, AV_LOG_WARNING,
|
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);
|
index, c->meta_keys_count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user