summaryrefslogtreecommitdiff
path: root/libavformat/asfdec.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/asfdec.c')
-rw-r--r--libavformat/asfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 4b04227a71..1790096d4f 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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,