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/debdelta-0.65/minigzip.c FINAL RESULTS: data/debdelta-0.65/minigzip.c:175:5: [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(outfile, file); data/debdelta-0.65/minigzip.c:176: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(outfile, Z_SUFFIX); data/debdelta-0.65/minigzip.c:210:5: [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(buf, file); data/debdelta-0.65/minigzip.c:219:9: [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(infile, Z_SUFFIX); data/debdelta-0.65/minigzip.c:104:11: [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. local char buf[BUFLEN]; data/debdelta-0.65/minigzip.c:137:11: [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. local char buf[BUFLEN]; data/debdelta-0.65/minigzip.c:171:11: [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. local char outfile[MAX_NAME_LEN]; data/debdelta-0.65/minigzip.c:178:10: [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). in = fopen(file, "rb"); data/debdelta-0.65/minigzip.c:204:11: [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. local char buf[MAX_NAME_LEN]; data/debdelta-0.65/minigzip.c:230:11: [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). out = fopen(outfile, "wb"); data/debdelta-0.65/minigzip.c:257:5: [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 outmode[20]; data/debdelta-0.65/minigzip.c:259:5: [2] (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). Risk is low because the source is a constant string. strcpy(outmode, "wb6 "); data/debdelta-0.65/minigzip.c:208: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). uInt len = (uInt)strlen(file); ANALYSIS SUMMARY: Hits = 13 Lines analyzed = 311 in approximately 0.04 seconds (7263 lines/second) Physical Source Lines of Code (SLOC) = 215 Hits@level = [0] 4 [1] 1 [2] 8 [3] 0 [4] 4 [5] 0 Hits@level+ = [0+] 17 [1+] 13 [2+] 12 [3+] 4 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 79.0698 [1+] 60.4651 [2+] 55.814 [3+] 18.6047 [4+] 18.6047 [5+] 0 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.