From: Peter Howkins Date: Mon, 2 Jul 2018 22:01:54 +0000 (+0100) Subject: libDtSearch: Coverity 86856 X-Git-Tag: 2.3.0a~252 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0876476cae64052da04c51870dfa8e1c0d74d8e5;p=oweals%2Fcde.git libDtSearch: Coverity 86856 --- 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);