Module: libav
Branch: master
Commit: 77cf23668991bfd1fb69339f13e1511b4186b7b3

Author:    Alexandra Hájková <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Wed Sep  2 14:27:42 2015 +0200

asfdec: alloc enough space for storing name in asf_read_metadata_obj

Signed-off-by: Luca Barbato <[email protected]>

---

 libavformat/asfdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 4b04227..1790096 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,

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to