From 0876476cae64052da04c51870dfa8e1c0d74d8e5 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Mon, 2 Jul 2018 23:01:54 +0100 Subject: [PATCH] libDtSearch: Coverity 86856 --- cde/lib/DtSearch/raima/pathfcns.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cde/lib/DtSearch/raima/pathfcns.c b/cde/lib/DtSearch/raima/pathfcns.c index 3e8743fd..d1b3d6f4 100644 --- a/cde/lib/DtSearch/raima/pathfcns.c +++ b/cde/lib/DtSearch/raima/pathfcns.c @@ -182,8 +182,7 @@ char *dbfpath /* one element from DBFPATH, or NULL for no path */ } if (strlen(path_str) + strlen(dbfpath) >= FILENMLEN) return (db_status = S_NAMELEN); - strcpy(filespec,dbfpath); - strcat(filespec,remdrv(path_str)); + snprintf(filespec, sizeof(filespec), "%s%s", dbfpath, remdrv(path_str)); strcpy(path_str,filespec); return (db_status = S_OKAY); -- 2.25.1