dtcm: Coverity 89423
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:00:47 +0000 (01:00 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:00:47 +0000 (01:00 +0100)
cde/programs/dtcm/dtcm/dssw.c

index d0add5e09fde8eb0325059bf32d8905f2df7a5d1..ca3b6af626d6c6391053eade443881db12d15f68 100644 (file)
@@ -862,7 +862,7 @@ get_dssw_times(DSSW *dssw) {
                XmToggleButtonGetState(dssw->start_am) ? TIME_AM : TIME_PM;
 
        str = XmTextGetString(dssw->stop_text);
-       strcpy(dssw->stop_val.val, str);
+       snprintf(dssw->stop_val.val, sizeof(dssw->stop_val.val), "%s", str);
        XtFree(str);
        dssw->stop_val.block =
                XmToggleButtonGetState(dssw->stop_am) ? TIME_AM : TIME_PM;