mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '46191a2da16f751e53d93646ae1388d421d12bee'
* commit '46191a2da16f751e53d93646ae1388d421d12bee': mov: fix a possible invalid read in mov_read_mac_string() Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
e166fe2e1f
|
@ -162,7 +162,11 @@ static int mov_read_mac_string(MOVContext *c, AVIOContext *pb, int len,
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i = 0; i < len; i++) {
|
||||||
uint8_t t, c = avio_r8(pb);
|
uint8_t t, c = avio_r8(pb);
|
||||||
if (c < 0x80 && p < end)
|
|
||||||
|
if (p >= end)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (c < 0x80)
|
||||||
*p++ = c;
|
*p++ = c;
|
||||||
else if (p < end)
|
else if (p < end)
|
||||||
PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);
|
PUT_UTF8(mac_to_unicode[c-0x80], t, if (p < end) *p++ = t;);
|
||||||
|
|
Loading…
Reference in New Issue