libDtSearch: Coverity 86944
authorPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 22:07:39 +0000 (23:07 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 22:07:39 +0000 (23:07 +0100)
cde/lib/DtSearch/dtsrapi.c

index 1d65f71094405af339f3c4d8dc3172f75731a8bc..e9be4604b880e6fa7a21a23e91a09ec6aec28ee7 100644 (file)
@@ -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;
        }
     }