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/xteddy-2.2/xteddy.c FINAL RESULTS: data/xteddy-2.2/xteddy.c:95: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). strcat(strcpy(fbuf, PIXMAP_PATH), "/"); data/xteddy-2.2/xteddy.c:96: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(strcat(strcpy(sbuf, DEFAULT_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:96:17: [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). strcat(strcat(strcpy(sbuf, DEFAULT_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:98: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(name, teddy); data/xteddy-2.2/xteddy.c:105:5: [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(name, *ptr); data/xteddy-2.2/xteddy.c:109:5: [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(sbuf, *ptr); data/xteddy-2.2/xteddy.c:115: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(strcat(strcpy(sbuf, DEFAULT_LOCAL_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:115:17: [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). strcat(strcat(strcpy(sbuf, DEFAULT_LOCAL_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:120:5: [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(sbuf, *ptr); data/xteddy-2.2/xteddy.c:76: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 fbuf[MAXPATHLEN], sbuf[MAXPATHLEN], *name, *ext, *sext; data/xteddy-2.2/xteddy.c:152: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[20]; data/xteddy-2.2/xteddy.c:301:13: [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. const char data[1] = { 0 }; data/xteddy-2.2/xteddy.c:95: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(strcpy(fbuf, PIXMAP_PATH), "/"); data/xteddy-2.2/xteddy.c:96:10: [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(strcat(strcpy(sbuf, DEFAULT_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:97: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). name = fbuf + strlen(fbuf); data/xteddy-2.2/xteddy.c:101: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(name, "."); data/xteddy-2.2/xteddy.c:102: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). ext = name + strlen(name); data/xteddy-2.2/xteddy.c:103: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). sext = sbuf + strlen(sbuf); data/xteddy-2.2/xteddy.c:108:5: [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(sbuf, "."); /* missing the dot before the extension! */ data/xteddy-2.2/xteddy.c:115:10: [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(strcat(strcpy(sbuf, DEFAULT_LOCAL_IMAGE_DIR), "/"), teddy); data/xteddy-2.2/xteddy.c:117: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). sext = sbuf + strlen(sbuf); data/xteddy-2.2/xteddy.c:119:5: [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(sbuf, "."); /* missing the dot before the extension! */ data/xteddy-2.2/xteddy.c:205: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(teddy) == 0){ /* accept "-f <name>" as well as "-f<name>" */ ANALYSIS SUMMARY: Hits = 23 Lines analyzed = 430 in approximately 0.03 seconds (16089 lines/second) Physical Source Lines of Code (SLOC) = 338 Hits@level = [0] 20 [1] 11 [2] 3 [3] 0 [4] 9 [5] 0 Hits@level+ = [0+] 43 [1+] 23 [2+] 12 [3+] 9 [4+] 9 [5+] 0 Hits/KSLOC@level+ = [0+] 127.219 [1+] 68.0473 [2+] 35.503 [3+] 26.6272 [4+] 26.6272 [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.