summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2017-11-13 10:44:16 +0800
committerSteven Liu <lingjiujianke@gmail.com>2017-11-13 10:44:16 +0800
commit3ee63f3fb70c3be36aa62adf9ad0fe2defa2bd51 (patch)
tree7be10398e53d853e58f5ad87baeb45dcf03c087c /libavformat
parentd9ff1e4c8bdf97cbb1ab4bd97102eefbe8ebf95a (diff)
avformat/hlsenc: allocate space for terminating null
Fixes CID #1420394
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/hlsenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
index 5ea9d216a4..b571772f60 100644
--- a/libavformat/hlsenc.c
+++ b/libavformat/hlsenc.c
@@ -1455,7 +1455,7 @@ static int hls_write_header(AVFormatContext *s)
if (basename_size > 0) {
hls->base_output_dirname = av_malloc(basename_size);
} else {
- hls->base_output_dirname = av_malloc(strlen(hls->fmp4_init_filename));
+ hls->base_output_dirname = av_malloc(strlen(hls->fmp4_init_filename) + 1);
}
if (!hls->base_output_dirname) {
ret = AVERROR(ENOMEM);