From: Peter Howkins Date: Mon, 2 Jul 2018 21:59:03 +0000 (+0100) Subject: libDtSearch: Coverity 86804 X-Git-Tag: 2.3.0a~253 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c8233c920001d44b1f685a83603c9c4c9f7ba200;p=oweals%2Fcde.git libDtSearch: Coverity 86804 --- diff --git a/cde/lib/DtSearch/dtsrve.c b/cde/lib/DtSearch/dtsrve.c index 1f846eb0..e6711972 100644 --- a/cde/lib/DtSearch/dtsrve.c +++ b/cde/lib/DtSearch/dtsrve.c @@ -282,8 +282,7 @@ int ve_initialize (void) */ if (db->dbrec.or_fzkeysz > 0) { /* build complete path-file name */ - strcpy (d9x_fname, db->path); - strcat (d9x_fname, db->name); + snprintf(d9x_fname, sizeof(d9x_fname), "%s%s", db->path, db->name); d9x_fext = d9x_fname + strlen (d9x_fname); strcpy (d9x_fext, ".d97"); if (debugging)