mirror of https://git.ffmpeg.org/ffmpeg.git
avformat/hlsenc: allocate space for terminating null
Fixes CID #1420394
This commit is contained in:
parent
d9ff1e4c8b
commit
3ee63f3fb7
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue