mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-10 00:40:01 +01:00
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: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73ef1f47f5)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
ae1c6169b6
commit
81b5f4fac7
@@ -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->filename, wc->chunk_index - 1) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user