Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-addressing.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-addressing.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-connection-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-config.h Examining data/telepathy-mission-control-5-5.16.5/src/plugin-request.c Examining data/telepathy-mission-control-5-5.16.5/src/plugin-request.h Examining data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h Examining data/telepathy-mission-control-5-5.16.5/src/client-registry.c Examining data/telepathy-mission-control-5-5.16.5/src/client-registry.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-mission-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-connection.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account.h Examining data/telepathy-mission-control-5-5.16.5/src/stamp-mcd-enum-types.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dbusprop.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dbusprop.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dispatch-operation-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-manager.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-manager.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-debug.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-debug.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dispatcher-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-conditions.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-conditions.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-storage-ag-hidden.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-storage-ag-hidden.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-connection-service-points.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-connection-service-points.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-manager-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-master-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-client.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-client-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-slacker.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-slacker.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-operation.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-operation.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-default.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-default.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-sso.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-sso.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-storage.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-storage.h Examining data/telepathy-mission-control-5-5.16.5/src/request.c Examining data/telepathy-mission-control-5-5.16.5/src/request.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager.h Examining data/telepathy-mission-control-5-5.16.5/src/channel-utils.c Examining data/telepathy-mission-control-5-5.16.5/src/channel-utils.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-requests.c Examining data/telepathy-mission-control-5-5.16.5/src/plugin-dispatch-operation.c Examining data/telepathy-mission-control-5-5.16.5/src/plugin-dispatch-operation.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-connection.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-connection.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-handler-map.c Examining data/telepathy-mission-control-5-5.16.5/src/plugin-loader.c Examining data/telepathy-mission-control-5-5.16.5/src/plugin-loader.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-channel-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/gtypes.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dispatcher.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dispatcher.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-master.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-master.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-misc.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-misc.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-dispatch-operation.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-handler-map-priv.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-mission.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-mission.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-service.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-service.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-channel.c Examining data/telepathy-mission-control-5-5.16.5/src/mcd-channel.h Examining data/telepathy-mission-control-5-5.16.5/src/connectivity-monitor.c Examining data/telepathy-mission-control-5-5.16.5/src/connectivity-monitor.h Examining data/telepathy-mission-control-5-5.16.5/src/mcd-account.c Examining data/telepathy-mission-control-5-5.16.5/util/wait-for-name.c Examining data/telepathy-mission-control-5-5.16.5/util/mc-tool.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/debug.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/debug.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/mission-control-plugins.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dispatch-operation.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dispatch-operation.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/account.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/account.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/account-storage.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/account-storage.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/implementation.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/request.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/request.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/debug-internal.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/request-policy.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/request-policy.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dbus-acl.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dbus-acl.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/loader.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/loader.h Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dispatch-operation-policy.c Examining data/telepathy-mission-control-5-5.16.5/mission-control-plugins/dispatch-operation-policy.h Examining data/telepathy-mission-control-5-5.16.5/tests/value-is-same.c Examining data/telepathy-mission-control-5-5.16.5/tests/keyfile.c Examining data/telepathy-mission-control-5-5.16.5/tests/tease-the-minotaur.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/mcp-dbus-caller-permission.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/mc-debug-server.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/dbus-account-plugin.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/dbus-account-plugin.h Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/mcp-plugin.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/mcp-account-diversion.c Examining data/telepathy-mission-control-5-5.16.5/tests/twisted/fake-network-monitor.c Examining data/telepathy-mission-control-5-5.16.5/tests/account-store-libaccounts.c Examining data/telepathy-mission-control-5-5.16.5/tests/account-store-libaccounts.h Examining data/telepathy-mission-control-5-5.16.5/tests/account-store-default.c Examining data/telepathy-mission-control-5-5.16.5/tests/account-store-default.h Examining data/telepathy-mission-control-5-5.16.5/tests/account-store.c Examining data/telepathy-mission-control-5-5.16.5/server/mc-server.c Examining data/telepathy-mission-control-5-5.16.5/plugins/mcp-dbus-aegis-acl.c FINAL RESULTS: data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:83:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, SP_TIMESTAMP_PATH); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:98:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(filename+offset, step); data/telepathy-mission-control-5-5.16.5/tests/account-store.c:225:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, DOCSTRING_A, name); data/telepathy-mission-control-5-5.16.5/tests/account-store.c:232:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf (stderr, DOCSTRING_B); data/telepathy-mission-control-5-5.16.5/tests/account-store.c:235:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf (stderr, fmt, ap); data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-default.c:62:30: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return g_build_filename (g_get_home_dir(), base + 1, "accounts.cfg", NULL); data/telepathy-mission-control-5-5.16.5/src/mcd-account.c:663:27: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return g_build_filename (g_get_home_dir(), base + 1, data/telepathy-mission-control-5-5.16.5/src/mcd-debug.c:116:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. mc_debug_str = getenv ("MC_DEBUG"); data/telepathy-mission-control-5-5.16.5/plugins/mcp-dbus-aegis-acl.c:175:7: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager.c:1839:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file = fopen (priv->account_connections_file, "w"); data/telepathy-mission-control-5-5.16.5/src/mcd-account.c:451:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (parameter, &tmp, sizeof (tmp)); data/telepathy-mission-control-5-5.16.5/src/mcd-debug.c:121:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). level = atoi (mc_debug_str); data/telepathy-mission-control-5-5.16.5/src/mcd-storage.c:903:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (value, &tmp, sizeof (tmp)); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:61:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). _tmp_fd = open("/tmp/stamps/" __FILE__ ":" step, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); \ data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char filename[256], *cmdname; data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:80:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:100:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_CREAT|O_WRONLY, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); data/telepathy-mission-control-5-5.16.5/server/mc-server.c:87:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (write (STDERR_FILENO, message, strlen (message)) == -1) data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-sso.c:164:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const guint plength = strlen (prefix); data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-sso.c:941:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gchar *param_key = g_strdup (setting->mc_name + strlen (MCPP)); data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager-sso.c:962:63: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gchar *param_key = g_strdup (setting->mc_name + strlen (MCPP)); data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager.c:481:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen (path); data/telepathy-mission-control-5-5.16.5/src/mcd-account-manager.c:1812:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). object_path + strlen (TP_ACCOUNT_OBJECT_PATH_BASE)); data/telepathy-mission-control-5-5.16.5/src/mcd-master.c:80:33: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). # error On Unix, MC relies on umask() for account privacy data/telepathy-mission-control-5-5.16.5/src/mcd-master.c:203:5: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask (0077); data/telepathy-mission-control-5-5.16.5/src/mcd-storage.c:594:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). gsize base_len = strlen (TP_ACCOUNT_OBJECT_PATH_BASE); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:85:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). count = read(fd, filename+offset, sizeof(filename)-offset); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:91:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memmove(filename+offset, cmdname+1, strlen(cmdname)); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:92:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). offset += strlen(filename+offset); data/telepathy-mission-control-5-5.16.5/src/sp_timestamp.h:95:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). assert(sizeof(filename) > offset + 1 + strlen(step) + 1); data/telepathy-mission-control-5-5.16.5/tests/account-store-libaccounts.c:136:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const guint plength = strlen (prefix); data/telepathy-mission-control-5-5.16.5/util/mc-tool.c:299:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). width = 11 - strlen (type); if (width < 0) width = 0; data/telepathy-mission-control-5-5.16.5/util/mc-tool.c:563:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen (tp_account_get_path_suffix (account))); data/telepathy-mission-control-5-5.16.5/util/mc-tool.c:807:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). printf (" %s\n", *supersedes + strlen (TP_ACCOUNT_OBJECT_PATH_BASE)); ANALYSIS SUMMARY: Hits = 34 Lines analyzed = 45058 in approximately 0.93 seconds (48347 lines/second) Physical Source Lines of Code (SLOC) = 30895 Hits@level = [0] 39 [1] 17 [2] 9 [3] 3 [4] 5 [5] 0 Hits@level+ = [0+] 73 [1+] 34 [2+] 17 [3+] 8 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 2.36284 [1+] 1.1005 [2+] 0.550251 [3+] 0.258942 [4+] 0.161838 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.