Skip to content
Snippets Groups Projects
Commit 3ee63f3f authored by Timo Rothenpieler's avatar Timo Rothenpieler Committed by Steven Liu
Browse files

avformat/hlsenc: allocate space for terminating null

Fixes CID #1420394
parent d9ff1e4c
No related branches found
No related tags found
No related merge requests found
...@@ -1455,7 +1455,7 @@ static int hls_write_header(AVFormatContext *s) ...@@ -1455,7 +1455,7 @@ static int hls_write_header(AVFormatContext *s)
if (basename_size > 0) { if (basename_size > 0) {
hls->base_output_dirname = av_malloc(basename_size); hls->base_output_dirname = av_malloc(basename_size);
} else { } 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) { if (!hls->base_output_dirname) {
ret = AVERROR(ENOMEM); ret = AVERROR(ENOMEM);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment