From: Peter Howkins Date: Wed, 4 Jul 2018 00:00:47 +0000 (+0100) Subject: dtcm: Coverity 89423 X-Git-Tag: 2.3.0a~222 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7490caee7c2c2eeed616eb8542b295eb2ce4da68;p=oweals%2Fcde.git dtcm: Coverity 89423 --- diff --git a/cde/programs/dtcm/dtcm/dssw.c b/cde/programs/dtcm/dtcm/dssw.c index d0add5e0..ca3b6af6 100644 --- a/cde/programs/dtcm/dtcm/dssw.c +++ b/cde/programs/dtcm/dtcm/dssw.c @@ -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;