dtdocbook: Coverity 86763
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:59:42 +0000 (01:59 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:59:42 +0000 (01:59 +0100)
cde/programs/dtdocbook/instant/main.c

index c3833687e840ef3a7309470edbfa3edfa71f12ba..09554a490882896786aab7f709a83c1b26fbada3 100644 (file)
@@ -621,7 +621,7 @@ CmdLineSetVariable(
     int                n;
 
     /* Turn '=' into a space, to isolate the name.  Then set variable. */
-    strcpy(buf, var);
+    snprintf(buf, sizeof(buf), "%s", var);
     if ((cp=strchr(buf, '='))) {
        /* we have "var=value" */
        *cp = ' ';