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/ssh-askpass-1.2.4.1/drawing.c Examining data/ssh-askpass-1.2.4.1/dynlist.c Examining data/ssh-askpass-1.2.4.1/resources.c Examining data/ssh-askpass-1.2.4.1/x11-ssh-askpass.c Examining data/ssh-askpass-1.2.4.1/drawing.h Examining data/ssh-askpass-1.2.4.1/dynlist.h Examining data/ssh-askpass-1.2.4.1/resources.h Examining data/ssh-askpass-1.2.4.1/x11-ssh-askpass.h FINAL RESULTS: data/ssh-askpass-1.2.4.1/resources.c:56:3: [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 (full_name, progname); data/ssh-askpass-1.2.4.1/resources.c:58:3: [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 (full_name, res_name); data/ssh-askpass-1.2.4.1/resources.c:59:3: [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 (full_class, progclass); data/ssh-askpass-1.2.4.1/resources.c:61:3: [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 (full_class, res_class); data/ssh-askpass-1.2.4.1/resources.c:55: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 full_name [1024], full_class [1024]; data/ssh-askpass-1.2.4.1/resources.c:75: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 *tmp, buf [100]; data/ssh-askpass-1.2.4.1/x11-ssh-askpass.c:177:4: [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 units[3]; data/ssh-askpass-1.2.4.1/x11-ssh-askpass.c:1268:4: [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 s[2]; data/ssh-askpass-1.2.4.1/resources.c:57:3: [1] (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). Risk is low because the source is a constant character. strcat (full_name, "."); data/ssh-askpass-1.2.4.1/resources.c:60:3: [1] (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). Risk is low because the source is a constant character. strcat (full_class, "."); data/ssh-askpass-1.2.4.1/resources.c:65:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (str, (char *) value.addr, value.size); data/ssh-askpass-1.2.4.1/resources.c:85: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). (buf[strlen(buf)-1] == ' ' || data/ssh-askpass-1.2.4.1/resources.c:86: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). buf[strlen(buf)-1] == '\t')) data/ssh-askpass-1.2.4.1/resources.c:87:9: [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). buf[strlen(buf)-1] = 0; data/ssh-askpass-1.2.4.1/resources.c:158:17: [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 (s2 = s + strlen(s) - 1; s2 > s; s2--) data/ssh-askpass-1.2.4.1/x11-ssh-askpass.c:189:8: [1] (buffer) sscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. n = sscanf(s, "%ld / %2s", &resolution, units); data/ssh-askpass-1.2.4.1/x11-ssh-askpass.c:224: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). t->textLength = strlen(t->text); ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 2262 in approximately 0.36 seconds (6294 lines/second) Physical Source Lines of Code (SLOC) = 1789 Hits@level = [0] 24 [1] 9 [2] 4 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 41 [1+] 17 [2+] 8 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 22.9178 [1+] 9.50252 [2+] 4.47177 [3+] 2.23589 [4+] 2.23589 [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.