1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-23 23:32:26 +00:00

codec_tags: fix wrong buffer size

Obvious mistake. This reported 44 bytes more data than what was
available. Could cause out of bounds reads. Security researchers would
claim a major victory if they found something like this in more popular
software, and would create a website for it.
This commit is contained in:
wm4 2019-06-13 18:27:51 +02:00 committed by Jan Ekström
parent ea91162802
commit c379950ce0

View File

@ -75,7 +75,7 @@ static void map_audio_pcm_tag(struct mp_codec_params *c)
// Compressed formats might use this.
c->extradata += 22;
c->extradata_size += 22;
c->extradata_size -= 22;
}
int bits = c->bits_per_coded_sample;