mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02: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 73ef1f47f59333328264a968c8fbbcfb0bf0643f) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
9bb9aa9085
commit
2df8814ae7
@ -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…
x
Reference in New Issue
Block a user