dtcm: Coverity 89566
authorPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 23:54:54 +0000 (00:54 +0100)
committerPeter Howkins <flibble@users.sf.net>
Tue, 3 Jul 2018 23:54:54 +0000 (00:54 +0100)
cde/programs/dtcm/dtcm/cm_insert.c

index 614e001fd6b43790b729233da7cdc4f68fb5aae9..f445141beb97948879df1297e56ea6da83c9b0ca 100644 (file)
@@ -212,7 +212,7 @@ prompt_for_insert(Props *p) {
                prompt_for_line(
                        catgets(DT_catd, 1, 199, "End (%s): "), "None", cm_end);
 
-       strcpy(cm_repeatstr, catgets(DT_catd, 1, 200, "One Time"));
+       snprintf(cm_repeatstr, sizeof(cm_repeatstr), "%s", catgets(DT_catd, 1, 200, "One Time"));
 
        prompt_for_line(catgets(DT_catd, 1, 201, 
                        "Repeat (%s): "), cm_repeatstr, cm_repeatstr);