libDtSearch: Coverity 86762
authorPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:51:16 +0000 (22:51 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:51:16 +0000 (22:51 +0100)
cde/lib/DtSearch/raima/pathfcns.c

index 75a2dd780891125d41ff19a1f4b8359a062f3dcb..3e8743fdc95122816dabb65f4c3f819e1cb4c021 100644 (file)
@@ -212,7 +212,7 @@ int num                     /* Element to extract (0 = first) */
 
    if (dbxpath == NULL) return (NULL);
    if (dbxpath[0] == '\0') return (NULL);      /* NULL string? */
-   strcpy(element,dbxpath);
+   snprintf(element, sizeof(element), "%s", dbxpath);
 
    /* If there is only one element, always return that */
    if (strchr(element,';') == NULL) {