Commit e166fe2e authored by Clément Bœsch's avatar Clément Bœsch

Merge commit '46191a2d'

* commit '46191a2d':
  mov: fix a possible invalid read in mov_read_mac_string()
Merged-by: 's avatarClément Bœsch <u@pkh.me>
parents 5729acee 46191a2d
......@@ -162,7 +162,11 @@ static int mov_read_mac_string(MOVContext *c, AVIOContext *pb, int len,
for (i = 0; i < len; i++) {
uint8_t t, c = avio_r8(pb);
if (c < 0x80 && p < end)
if (p >= end)
continue;
if (c < 0x80)
*p++ = c;
else if (p < end)
PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);
......
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