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:
parent
9bb9aa9085
commit
2df8814ae7
1 changed files with 1 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue