[MPlayer-cvslog] CVS: main m_option.c,1.42,1.43

Richard Felker CVS syncmail at mplayerhq.hu
Tue Oct 25 19:28:12 CEST 2005


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv32215

Modified Files:
	m_option.c 
Log Message:
fix incorrect use of strl* functions (patch by reimar)
(unknown suboption "cop" with -oac copy, etc)


Index: m_option.c
===================================================================
RCS file: /cvsroot/mplayer/main/m_option.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- m_option.c	13 Oct 2005 18:33:56 -0000	1.42
+++ m_option.c	25 Oct 2005 17:28:10 -0000	1.43
@@ -886,7 +886,7 @@
       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 @@
         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 @@
             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];
         }
       }




More information about the MPlayer-cvslog mailing list