diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2019-04-20 00:03:14 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-02 19:41:48 +0100 |
commit | 2df8814ae7ce3d586db833df8de75498bc9e2abf (patch) | |
tree | fc86784785f5fc82b502af430a0718553cdc8798 | |
parent | 9bb9aa9085e5ce2249b653190f0d5dda18f936c2 (diff) | |
download | ffmpeg-2df8814ae7ce3d586db833df8de75498bc9e2abf.tar.gz |
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 73ef1f47f59333328264a968c8fbbcfb0bf0643f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/webm_chunk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index 3dfef4bb0e..265e6ec845 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -93,7 +93,7 @@ static int get_chunk_filename(AVFormatContext *s, int is_header, char *filename) if (!wc->header_filename) { 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) { |