diff options
Diffstat (limited to 'm_option.c')
-rw-r--r-- | m_option.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/m_option.c b/m_option.c index cab7184a15..d63ba0ac83 100644 --- a/m_option.c +++ b/m_option.c @@ -16,6 +16,7 @@ //#include "m_config.h" #include "mp_msg.h" #include "stream/url.h" +#include "libavutil/avstring.h" // Don't free for 'production' atm #ifndef MP_DEBUG @@ -920,7 +921,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 + 1); + av_strlcpy(subopt, p, optlen + 1); p = &p[optlen]; if (p[0] == '=') { sscanf_ret = 2; @@ -928,7 +929,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 + 1); + av_strlcpy(subparam, p, optlen + 1); p = &p[optlen]; if (p[0] != '"') { mp_msg(MSGT_CFGPARSER, MSGL_ERR, "Terminating '\"' missing for '%s'\n", subopt); @@ -943,11 +944,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 + 1); + av_strlcpy(subparam, p, optlen + 1); p = &p[optlen]; } else { optlen = strcspn(p, ":"); - strlcpy(subparam, p, optlen + 1); + av_strlcpy(subparam, p, optlen + 1); p = &p[optlen]; } } |