summaryrefslogtreecommitdiffstats
path: root/m_option.c
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-25 17:28:10 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-10-25 17:28:10 +0000
commit97f2d88db08c2f079f522d315ff4f78f88d9f74a (patch)
treea47cca5011b61be92e3ff8109f0dcda73721e8cd /m_option.c
parentc6290a8d4b6dcb3aa06779286670da4fe2d4fb1f (diff)
downloadmpv-97f2d88db08c2f079f522d315ff4f78f88d9f74a.tar.bz2
mpv-97f2d88db08c2f079f522d315ff4f78f88d9f74a.tar.xz
fix incorrect use of strl* functions (patch by reimar)
(unknown suboption "cop" with -oac copy, etc) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16855 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'm_option.c')
-rw-r--r--m_option.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/m_option.c b/m_option.c
index e595d0bb84..3601e2d4f0 100644
--- a/m_option.c
+++ b/m_option.c
@@ -886,7 +886,7 @@ static int parse_subconf(m_option_t* opt,char *name, char *param, void* dst, int
int optlen = strcspn(p, ":=");
/* clear out */
subopt[0] = subparam[0] = 0;
- strlcpy(subopt, p, optlen);
+ strlcpy(subopt, p, optlen + 1);
p = &p[optlen];
if (p[0] == '=') {
sscanf_ret = 2;
@@ -894,7 +894,7 @@ static int parse_subconf(m_option_t* opt,char *name, char *param, void* dst, int
if (p[0] == '"') {
p = &p[1];
optlen = strcspn(p, "\"");
- strlcpy(subparam, p, optlen);
+ strlcpy(subparam, p, optlen + 1);
p = &p[optlen];
if (p[0] != '"') {
mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Terminating '\"' missing for '%s'\n", subopt);
@@ -909,11 +909,11 @@ static int parse_subconf(m_option_t* opt,char *name, char *param, void* dst, int
return M_OPT_INVALID;
}
p = &p[1];
- strlcpy(subparam, p, optlen);
+ strlcpy(subparam, p, optlen + 1);
p = &p[optlen];
} else {
optlen = strcspn(p, ":");
- strlcpy(subparam, p, optlen);
+ strlcpy(subparam, p, optlen + 1);
p = &p[optlen];
}
}