You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
hlsenc: Allocate enough space for the pattern string
If s->filename doesn't contain any period/filename extension to strip away, the buffer will be too small to fit both strings. This isn't any buffer overflow since the concatenation uses av_strlcat with the right buffer size. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
committed by
Martin Storsjö
parent
0940580adb
commit
3193b13aa1
@@ -182,7 +182,7 @@ static int hls_write_header(AVFormatContext *s)
|
|||||||
int ret, i;
|
int ret, i;
|
||||||
char *p;
|
char *p;
|
||||||
const char *pattern = "%d.ts";
|
const char *pattern = "%d.ts";
|
||||||
int basename_size = strlen(s->filename) + strlen(pattern);
|
int basename_size = strlen(s->filename) + strlen(pattern) + 1;
|
||||||
|
|
||||||
hls->number = 0;
|
hls->number = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user