Commit bd03afb5 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg_opt: avoid strcpy()

This fixes a warning on openbsd and is more robust
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent ec1ef083
......@@ -2137,7 +2137,7 @@ static int opt_preset(void *optctx, const char *opt, const char *arg)
if (strcspn(line, "#\n\r") == 0)
continue;
strcpy(tmp_line, line);
av_strlcpy(tmp_line, line, sizeof(tmp_line));
if (!av_strtok(key, "=", &value) ||
!av_strtok(value, "\r\n", &endptr)) {
av_log(NULL, AV_LOG_FATAL, "%s: Invalid syntax: '%s'\n", filename, line);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment