libDtSearch: Coverity 86780
authorPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:55:42 +0000 (22:55 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:55:42 +0000 (22:55 +0100)
cde/lib/DtSearch/ocf.c

index 3499ea084772096a1864c01dcbd9b08cea4fd5ec..61e78f40c22a7f18c437bbed84eaad9e597ee8c7 100644 (file)
@@ -1055,7 +1055,8 @@ OCFOPEN_OK:
        /* parse KEYWORD */
        if ((token = _XStrtok(inbuf, DELIMITERS, strtok_buf)) == NULL)
            continue;
-       strcpy (uprtoken, token);
+       
+       snprintf(uprtoken, sizeof(uprtoken), "%s", token);
        strupr (uprtoken);
 
        if (strcmp (uprtoken, "PATH") == 0) {