dtcm: Coverity 88902
authorPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:34:12 +0000 (16:34 +0100)
committerPeter Howkins <flibble@users.sf.net>
Fri, 13 Jul 2018 15:34:12 +0000 (16:34 +0100)
cde/programs/dtcm/server/cmscalendar.c

index 8daeb5394d8c7ff620386ffadb573230baefa6dd..b340288464fa0cac4ec5f3ead05fb3583ca9a094 100644 (file)
@@ -997,7 +997,7 @@ get_file_owner(char *calname, char **owner)
        *owner = NULL;
 
        if (_DtCmIsUserName(calname) == B_TRUE) {
-               strcpy(buf, calname);
+               snprintf(buf, sizeof(buf), "%s", calname);
        } else {
                if ((log = _DtCmsGetLogFN(calname)) == NULL)
                        return (CSA_E_INSUFFICIENT_MEMORY);