summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-03-26 00:50:23 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-03-26 00:51:19 (GMT)
commitbd03afb5bb480049abfe940d6dd2e672c29b2d73 (patch)
tree59e11336b4c916ae0ec03a38e6d5be9ff86f74dc
parentec1ef0838c0d05398032274fe3272fcfe50ea85c (diff)
downloadffmpeg-bd03afb5bb480049abfe940d6dd2e672c29b2d73.zip
ffmpeg-bd03afb5bb480049abfe940d6dd2e672c29b2d73.tar.gz
ffmpeg-bd03afb5bb480049abfe940d6dd2e672c29b2d73.tar.bz2
ffmpeg_opt: avoid strcpy()
This fixes a warning on openbsd and is more robust Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--ffmpeg_opt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 716696c..a134274 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -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);