[FFmpeg-devel] [PATCH 2/4] lavf/matroskaenc: fix uninitialized read

Rodger Combs rodger.combs at gmail.com
Thu Oct 27 09:16:11 EEST 2016


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

diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index d91055f..c94a490 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1547,7 +1547,7 @@ static int mkv_write_attachments(AVFormatContext *s)
 
     mkv->attachments = av_mallocz(sizeof(*mkv->attachments));
     if (!mkv->attachments)
-        return ret;
+        return AVERROR(ENOMEM);
 
     av_lfg_init(&c, av_get_random_seed());
 
-- 
2.10.0



More information about the ffmpeg-devel mailing list