asfdec: alloc enough space for storing name in asf_read_metadata_obj

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Alexandra Hájková 2015-09-02 14:27:42 +02:00 committed by Luca Barbato
parent 7cad1bf075
commit 77cf236689

View File

@ -583,7 +583,7 @@ static int asf_read_metadata_obj(AVFormatContext *s, const GUIDParseTable *g)
break;
type = avio_rl16(pb);
val_len = avio_rl32(pb);
name = av_malloc(name_len);
name = av_malloc(buflen);
if (!name)
return AVERROR(ENOMEM);
avio_get_str16le(pb, name_len, name,