Skip to content
Snippets Groups Projects
Commit 3193b13a authored by Stefano Sabatini's avatar Stefano Sabatini Committed by Martin Storsjö
Browse files

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: default avatarMartin Storsjö <martin@martin.st>
parent 0940580a
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@ static int hls_write_header(AVFormatContext *s)
int ret, i;
char *p;
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;
......
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