From: Peter Howkins Date: Mon, 2 Jul 2018 22:07:39 +0000 (+0100) Subject: libDtSearch: Coverity 86944 X-Git-Tag: 2.3.0a~251 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=889650ea45f3194c1a8681243e9319f6cc090b9b;p=oweals%2Fcde.git libDtSearch: Coverity 86944 --- diff --git a/cde/lib/DtSearch/dtsrapi.c b/cde/lib/DtSearch/dtsrapi.c index 1d65f710..e9be4604 100644 --- a/cde/lib/DtSearch/dtsrapi.c +++ b/cde/lib/DtSearch/dtsrapi.c @@ -826,7 +826,7 @@ int DtSearchHighlight ( usrblk.stemcount = stemcount; cptr = stems; for (i = 0; i < stemcount; i++) { - strcpy (usrblk.stems[i], cptr); + snprintf(usrblk.stems[i], sizeof(usrblk.stems[i]), "%s", cptr); cptr += DtSrMAXWIDTH_HWORD; } }