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/vinagre-3.22.0/plugins/spice/vinagre-spice-connection.c Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-tunnel.h Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-tab.c Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-connection.h Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-tunnel.c Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-tab.h Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-plugin.c Examining data/vinagre-3.22.0/plugins/spice/vinagre-spice-plugin.h Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-tab.h Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-plugin.h Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-connection.h Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-connection.c Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-plugin.c Examining data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-tab.c Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-tunnel.h Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-plugin.h Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-tab.c Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-tab.h Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-tunnel.c Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-connection.c Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-connection.h Examining data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-plugin.c Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-tab.h Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-connection.c Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-plugin.c Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-plugin.h Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-connection.h Examining data/vinagre-3.22.0/plugins/ssh/vinagre-ssh-tab.c Examining data/vinagre-3.22.0/vinagre/vinagre-protocol.c Examining data/vinagre-3.22.0/vinagre/vinagre-tubes-manager.h Examining data/vinagre-3.22.0/vinagre/vinagre-ssh.h Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-migration.c Examining data/vinagre-3.22.0/vinagre/vinagre-notebook.h Examining data/vinagre-3.22.0/vinagre/vinagre-utils.c Examining data/vinagre-3.22.0/vinagre/vinagre-main.c Examining data/vinagre-3.22.0/vinagre/vinagre-commands.h Examining data/vinagre-3.22.0/vinagre/vinagre-prefs.h Examining data/vinagre-3.22.0/vinagre/vinagre-static-extension.c Examining data/vinagre-3.22.0/vinagre/vinagre-debug.c Examining data/vinagre-3.22.0/vinagre/vinagre-mdns.h Examining data/vinagre-3.22.0/vinagre/vinagre-connection.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-entry.h Examining data/vinagre-3.22.0/vinagre/vinagre-prefs.c Examining data/vinagre-3.22.0/vinagre/vinagre-cache-prefs.c Examining data/vinagre-3.22.0/vinagre/vinagre-window-private.h Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-tree.c Examining data/vinagre-3.22.0/vinagre/vinagre-reverse-vnc-listener.h Examining data/vinagre-3.22.0/vinagre/vinagre-options.h Examining data/vinagre-3.22.0/vinagre/vinagre-commands.c Examining data/vinagre-3.22.0/vinagre/vinagre-notebook.c Examining data/vinagre-3.22.0/vinagre/if/getifaddrs.c Examining data/vinagre-3.22.0/vinagre/if/ifaddrs.h Examining data/vinagre-3.22.0/vinagre/vinagre-cache-prefs.h Examining data/vinagre-3.22.0/vinagre/vinagre-tubes-manager.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-tree.h Examining data/vinagre-3.22.0/vinagre/view/ovBox.h Examining data/vinagre-3.22.0/vinagre/view/drawer.h Examining data/vinagre-3.22.0/vinagre/view/autoDrawer.h Examining data/vinagre-3.22.0/vinagre/view/autoDrawer.c Examining data/vinagre-3.22.0/vinagre/view/drawer.c Examining data/vinagre-3.22.0/vinagre/view/ovBox.c Examining data/vinagre-3.22.0/vinagre/vinagre-options.c Examining data/vinagre-3.22.0/vinagre/vinagre-connect.c Examining data/vinagre-3.22.0/vinagre/vinagre-reverse-vnc-listener.c Examining data/vinagre-3.22.0/vinagre/vinagre-tube-handler.c Examining data/vinagre-3.22.0/vinagre/vinagre-tab.h Examining data/vinagre-3.22.0/vinagre/vinagre-connection.h Examining data/vinagre-3.22.0/vinagre/vinagre-reverse-vnc-listener-dialog.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-migration.h Examining data/vinagre-3.22.0/vinagre/vinagre-ssh.c Examining data/vinagre-3.22.0/vinagre/vinagre-window.h Examining data/vinagre-3.22.0/vinagre/pty_open.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks.c Examining data/vinagre-3.22.0/vinagre/vinagre-reverse-vnc-listener-dialog.h Examining data/vinagre-3.22.0/vinagre/vinagre-window.c Examining data/vinagre-3.22.0/vinagre/vinagre-tube-handler.h Examining data/vinagre-3.22.0/vinagre/pty_open.h Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-ui.h Examining data/vinagre-3.22.0/vinagre/vinagre-static-extension.h Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-entry.c Examining data/vinagre-3.22.0/vinagre/vinagre-ui.h Examining data/vinagre-3.22.0/vinagre/vinagre-tab.c Examining data/vinagre-3.22.0/vinagre/vinagre-protocol.h Examining data/vinagre-3.22.0/vinagre/vinagre-dirs.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks-ui.c Examining data/vinagre-3.22.0/vinagre/vinagre-plugins-engine.h Examining data/vinagre-3.22.0/vinagre/vinagre-connect.h Examining data/vinagre-3.22.0/vinagre/vinagre-vala.h Examining data/vinagre-3.22.0/vinagre/vinagre-plugins-engine.c Examining data/vinagre-3.22.0/vinagre/vinagre-bookmarks.h Examining data/vinagre-3.22.0/vinagre/vinagre-dnd.h Examining data/vinagre-3.22.0/vinagre/vinagre-mdns.c Examining data/vinagre-3.22.0/vinagre/vinagre-debug.h FINAL RESULTS: data/vinagre-3.22.0/vinagre/if/getifaddrs.c:120:10: [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). (void) strcpy(ifa->ifa_name = buf, lifrp->lifr_name); data/vinagre-3.22.0/vinagre/pty_open.c:387:4: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(command, args); data/vinagre-3.22.0/vinagre/pty_open.c:390:4: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(command, arg, NULL); data/vinagre-3.22.0/vinagre/vinagre-bookmarks-migration.c:230:31: [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. old = g_build_filename (g_get_home_dir (), data/vinagre-3.22.0/plugins/spice/vinagre-spice-tunnel.c:81:27: [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). *port = server[1] ? atoi (server[1]) : 22; data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-connection.c:268:56: [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). vinagre_vnc_connection_set_depth_profile (vnc_conn, atoi((const char *)s_value)); data/vinagre-3.22.0/plugins/vnc/vinagre-vnc-tunnel.c:75:27: [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). *port = server[1] ? atoi (server[1]) : 22; data/vinagre-3.22.0/vinagre/if/getifaddrs.c:106:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void) memcpy(buf, addr, len); data/vinagre-3.22.0/vinagre/pty_open.c:427:13: [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). hold_fd = open(path, O_RDWR|O_NOCTTY); data/vinagre-3.22.0/vinagre/pty_open.c:523:8: [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(path, O_RDWR); data/vinagre-3.22.0/vinagre/pty_open.c:697: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("/dev/ptmx", O_RDWR | O_NOCTTY); data/vinagre-3.22.0/vinagre/pty_open.c:699:8: [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("/dev/ptc", O_RDWR | O_NOCTTY); /* AIX */ data/vinagre-3.22.0/vinagre/vinagre-connect.c:376: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 a[AVAHI_ADDRESS_STR_MAX]; data/vinagre-3.22.0/vinagre/vinagre-connection.c:255:37: [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). vinagre_connection_set_port (conn, atoi ((const char *)s_value)); data/vinagre-3.22.0/vinagre/vinagre-connection.c:259:38: [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). vinagre_connection_set_width (conn, atoi ((const char *)s_value)); data/vinagre-3.22.0/vinagre/vinagre-connection.c:261:39: [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). vinagre_connection_set_height (conn, atoi ((const char *)s_value)); data/vinagre-3.22.0/vinagre/vinagre-connection.c:680:27: [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). lport = server[1] ? atoi (server[1]) : vinagre_protocol_get_default_port (ext); data/vinagre-3.22.0/vinagre/vinagre-connection.c:685:27: [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). lport = server[1] ? atoi (server[1]) : vinagre_protocol_get_default_port (ext); data/vinagre-3.22.0/vinagre/vinagre-mdns.c:74:3: [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 a[AVAHI_ADDRESS_STR_MAX], *u = NULL; data/vinagre-3.22.0/vinagre/vinagre-reverse-vnc-listener-dialog.c:64:3: [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[INET6_ADDRSTRLEN], *dup; data/vinagre-3.22.0/vinagre/vinagre-ssh.c:64:3: [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 *args[3]; data/vinagre-3.22.0/vinagre/vinagre-ssh.c:379:3: [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 buffer[1024]; data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-tab.c:867:21: [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). username_length = strlen (text); data/vinagre-3.22.0/plugins/rdp/vinagre-rdp-tab.c:871:21: [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). password_length = strlen (text); data/vinagre-3.22.0/vinagre/if/getifaddrs.c:89:10: [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). slen = strlen(lifrp->lifr_name) + 1; data/vinagre-3.22.0/vinagre/if/getifaddrs.c:121:10: [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). slen = strlen(lifrp->lifr_name) + 1; data/vinagre-3.22.0/vinagre/pty_open.c:244:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i = read(fd, buf + n, count - n); data/vinagre-3.22.0/vinagre/vinagre-bookmarks-ui.c:76: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). if (strlen (name) < 1) data/vinagre-3.22.0/vinagre/vinagre-bookmarks-ui.c:188: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). if (strlen (name) < 1) data/vinagre-3.22.0/vinagre/vinagre-connect.c:211:22: [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 (len > 0 && strlen (history_from_file[len-1]) == 0) data/vinagre-3.22.0/vinagre/vinagre-notebook.c:182:5: [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 (data)); data/vinagre-3.22.0/vinagre/vinagre-ssh.c:520:53: [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). password, strlen (password), data/vinagre-3.22.0/vinagre/vinagre-ssh.c:575:8: [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 (choice_string), data/vinagre-3.22.0/vinagre/vinagre-tab.c:928: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). for (i = strlen (basename)-1; i>=0; i--) data/vinagre-3.22.0/vinagre/vinagre-window.c:479: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). length = strlen (text); ANALYSIS SUMMARY: Hits = 35 Lines analyzed = 24970 in approximately 0.58 seconds (42952 lines/second) Physical Source Lines of Code (SLOC) = 17375 Hits@level = [0] 2 [1] 13 [2] 18 [3] 1 [4] 3 [5] 0 Hits@level+ = [0+] 37 [1+] 35 [2+] 22 [3+] 4 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 2.1295 [1+] 2.01439 [2+] 1.26619 [3+] 0.230216 [4+] 0.172662 [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.