dtcm: Coverity 88902
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:20:03 +0000 (01:20 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 00:20:03 +0000 (01:20 +0100)
cde/programs/dtcm/server/cmscalendar.c

index 545527955bce44287199a6b58f9b323e8fb15609..8858732c1e849793423582b8731803f1c7db3d2a 100644 (file)
@@ -1008,7 +1008,7 @@ get_file_owner(char *calname, char **owner)
                if (res == 0) {
 
                        if (pw = getpwuid(info.st_uid))
-                               strcpy(buf, pw->pw_name);
+                               snprintf(buf, sizeof(buf), "%s", pw->pw_name);
                        else
                                return (CSA_E_FAILURE);
                } else