dtcm: Coverity 89423
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:27:48 +0000 (16:27 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:27:48 +0000 (16:27 +0100)
cde/programs/dtcm/dtcm/dssw.c

index ca3b6af626d6c6391053eade443881db12d15f68..2fc7495419b65ea1e800884960188b051a4fd9c9 100644 (file)
@@ -856,7 +856,7 @@ get_dssw_times(DSSW *dssw) {
        char            *str;
 
        str = XmTextGetString(dssw->start_text);
-       strcpy(dssw->start_val.val, str);
+       snprintf(dssw->start_val.val, sizeof(dssw->start_val.val), "%s", str);
        XtFree(str);
        dssw->start_val.block =
                XmToggleButtonGetState(dssw->start_am) ? TIME_AM : TIME_PM;