From 85166ef29393adbd44158cc18ed4f4fd9cd405d0 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 2 Jul 2018 22:51:16 +0100 Subject: [PATCH] libDtSearch: Coverity 86762 --- cde/lib/DtSearch/raima/pathfcns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.25.1