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

index c5eeb8fedf3c37e8871457869ef88ff4f60dfb20..ec9dac5f1ceddc99527065df4331b3443652b4a3 100644 (file)
@@ -933,7 +933,7 @@ load_dssw_times(DSSW *dssw, Tick start, Tick stop, Boolean set_no_time) {
                        dssw->start_val.block = (buf[5] == 'a') ?
                                TIME_AM : TIME_PM;
                } else {
-                       strcpy(dssw->start_val.val, buf);
+                       snprintf(dssw->start_val.val, sizefof(dssw->start_val.val), "%s", buf);
                        dssw->start_val.block = TIME_AM;
                }
        }