[FFmpeg-devel] [PATCH 1/2] avformat/avienc: Correct possible dereference of null
Roman Savchenko
gmstima at gmail.com
Thu May 28 17:25:56 CEST 2015
---
libavformat/avienc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index fb2cdd2..62d84d5 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -386,6 +386,8 @@ static int avi_write_header(AVFormatContext *s)
t = NULL;
if (langstr) {
char* str = av_asprintf("Subtitle - %s-xx;02", langstr);
+ if (!str)
+ return AVERROR(ENOMEM);
ff_riff_write_info_tag(s->pb, "strn", str);
av_free(str);
}
--
1.9.1
More information about the ffmpeg-devel
mailing list