aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra.khirnova@gmail.com>2015-09-02 14:27:42 +0200
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-10-12 21:46:54 +0200
commitf235f511a01c8c8f88c217e5ed4ec331d66521ac (patch)
tree8b0626cbac6f953d5ef738956324d5a0fb592aa9
parentc149a4afeef512222c8c8939386370cbbc0025c1 (diff)
downloadffmpeg-f235f511a01c8c8f88c217e5ed4ec331d66521ac.tar.gz
asfdec: alloc enough space for storing name in asf_read_metadata_obj
Signed-off-by: Luca Barbato <lu_zero@gentoo.org> (cherry picked from commit 77cf23668991bfd1fb69339f13e1511b4186b7b3) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavformat/asfdec_o.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index fa00813a81..db559f6c2b 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.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,