Browse Source

ffmpeg_opt: avoid strcpy()

This fixes a warning on openbsd and is more robust

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 13 years ago
parent
commit
bd03afb5bb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      ffmpeg_opt.c

+ 1
- 1
ffmpeg_opt.c View File

@@ -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);


Loading…
Cancel
Save