Replace strncpy() with av_strlcpy().

This commit is contained in:
Alex Converse
2011-05-03 11:19:31 -07:00
committed by Alex Converse
parent aab6374bbe
commit 1a5e4fd8c5
7 changed files with 32 additions and 29 deletions

View File

@@ -3695,8 +3695,7 @@ static int opt_streamid(const char *opt, const char *arg)
char *p;
char idx_str[16];
strncpy(idx_str, arg, sizeof(idx_str));
idx_str[sizeof(idx_str)-1] = '\0';
av_strlcpy(idx_str, arg, sizeof(idx_str));
p = strchr(idx_str, ':');
if (!p) {
fprintf(stderr,