dtcm: Coverity 88481
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:22:34 +0000 (01:22 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:22:34 +0000 (01:22 +0100)
cde/programs/dtcm/server/parser.y

index 0b8646f59ae70d6a2b492a6b2a0219f363a742fb..a89ff0ebe57baf19be4e5caf0cc62e1c8e5ad0b6 100644 (file)
@@ -767,7 +767,7 @@ convert_2_tick(char *datestr)
 
        memset((void *)&tmstr, 0, sizeof(struct tm));
 
-       strcpy(datebuf, datestr);
+       snprintf(datebuf, sizeof(datebuf), "%s", datestr);
 
        /* get week day */
        ptr = strtok(datebuf, " ");