Commit 004564c9 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/wavenc: Check umid length

Fixes potential out of array read
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ecb4ae78
......@@ -120,7 +120,7 @@ static void bwf_write_bext_chunk(AVFormatContext *s)
avio_wl64(s->pb, time_reference);
avio_wl16(s->pb, 1); // set version to 1
if (tmp_tag = av_dict_get(s->metadata, "umid", NULL, 0)) {
if ((tmp_tag = av_dict_get(s->metadata, "umid", NULL, 0)) && strlen(tmp_tag->value) > 2) {
unsigned char umidpart_str[17] = {0};
int64_t i;
uint64_t umidpart;
......
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