From: Peter Howkins Date: Mon, 2 Jul 2018 21:51:16 +0000 (+0100) Subject: libDtSearch: Coverity 86762 X-Git-Tag: 2.3.0a~256 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=85166ef29393adbd44158cc18ed4f4fd9cd405d0;p=oweals%2Fcde.git libDtSearch: Coverity 86762 --- diff --git a/cde/lib/DtSearch/raima/pathfcns.c b/cde/lib/DtSearch/raima/pathfcns.c index 75a2dd78..3e8743fd 100644 --- a/cde/lib/DtSearch/raima/pathfcns.c +++ b/cde/lib/DtSearch/raima/pathfcns.c @@ -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) {