libDtSearch: Coverity 86804
authorPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:59:03 +0000 (22:59 +0100)
committerPeter Howkins <flibble@users.sf.net>
Mon, 2 Jul 2018 21:59:03 +0000 (22:59 +0100)
cde/lib/DtSearch/dtsrve.c

index 1f846eb0d3d5f0691162cc03c6384806c2c6f440..e6711972872d31be727116a2f4a833c0069a71da 100644 (file)
@@ -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)