mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +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>
This commit is contained in:
parent
ebd6fb23c5
commit
73ef1f47f5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user