aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorRoman Savchenko <gmstima@gmail.com>2015-05-28 18:25:56 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-05-29 00:04:41 +0200
commite85d91da48cf27a0852f5c9a676023fa08a59a7a (patch)
tree88f0e3b365cffb2e92a1c599df51fe479bac5dc0 /libavformat
parente2f3ea1cbb64e64c9ea59a56b2ee00a6e64f4de0 (diff)
downloadffmpeg-e85d91da48cf27a0852f5c9a676023fa08a59a7a.tar.gz
avformat/avienc: Correct possible dereference of null
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avienc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 5396a7d577..e5609d998c 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);
}