Commit 73ef1f47 authored by Andreas Rheinhardt's avatar Andreas Rheinhardt Committed by Michael Niedermayer

lavf/webm_chunk: Respect buffer size

The last argument of av_strlcpy is supposed to contain the size of the
destination buffer, but it was filled with the size of the source
string, effectively negating its very purpose.
Signed-off-by: 's avatarAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent ebd6fb23
......@@ -96,7 +96,7 @@ static int get_chunk_filename(AVFormatContext *s, int is_header, char *filename)
av_log(oc, AV_LOG_ERROR, "No header filename provided\n");
return AVERROR(EINVAL);
}
av_strlcpy(filename, wc->header_filename, strlen(wc->header_filename) + 1);
av_strlcpy(filename, wc->header_filename, MAX_FILENAME_SIZE);
} else {
if (av_get_frame_filename(filename, MAX_FILENAME_SIZE,
s->url, wc->chunk_index - 1) < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment