Browse Source

avformat/hlsenc: allocate space for terminating null

Fixes CID #1420394
tags/n4.0
Timo Rothenpieler Steven Liu 8 years ago
parent
commit
3ee63f3fb7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/hlsenc.c

+ 1
- 1
libavformat/hlsenc.c View File

@@ -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…
Cancel
Save