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/daa2iso-0.1.7e/src/LzmaDec.c Examining data/daa2iso-0.1.7e/src/daa_crypt.h Examining data/daa2iso-0.1.7e/src/daa2iso.c Examining data/daa2iso-0.1.7e/src/Types.h Examining data/daa2iso-0.1.7e/src/tinf.h Examining data/daa2iso-0.1.7e/src/LzmaDec.h Examining data/daa2iso-0.1.7e/src/tinflate.c FINAL RESULTS: data/daa2iso-0.1.7e/src/daa2iso.c:759:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(toadd, fmt, multinum); data/daa2iso-0.1.7e/src/LzmaDec.c:789: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(p->tempBuf, src, inSize); data/daa2iso-0.1.7e/src/LzmaDec.c:877:5: [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(dest, p->dic + dicPos, outSizeCur); data/daa2iso-0.1.7e/src/daa2iso.c:71:17: [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). #define fopen fopen64 data/daa2iso-0.1.7e/src/daa2iso.c:210:43: [2] (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 string. if(!p || (p && (strlen(p) != 4))) strcat(argv[2], ".iso"); data/daa2iso-0.1.7e/src/daa2iso.c:225: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). fdi = fopen(filei, "rb"); data/daa2iso-0.1.7e/src/daa2iso.c:229: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). fdo = fopen(fileo, "rb"); data/daa2iso-0.1.7e/src/daa2iso.c:236: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). fdo = fopen(fileo, "wb"); data/daa2iso-0.1.7e/src/daa2iso.c:453: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. memcpy(multi_filename, filei, len); data/daa2iso-0.1.7e/src/daa2iso.c:496:17: [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(out, in, len); data/daa2iso-0.1.7e/src/daa2iso.c:670:12: [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. static char filename[4096]; data/daa2iso-0.1.7e/src/daa2iso.c:694:12: [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. static char filename[4096 + 10]; data/daa2iso-0.1.7e/src/daa2iso.c:706: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. memcpy(filename, suggested, p - suggested); data/daa2iso-0.1.7e/src/daa2iso.c:708:9: [2] (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 string. strcat(filename, ".iso"); data/daa2iso-0.1.7e/src/daa2iso.c:761: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). fd = fopen(multi_filename, "rb"); data/daa2iso-0.1.7e/src/daa_crypt.h:149: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. memcpy(p, tmp, 128); data/daa2iso-0.1.7e/src/daa_crypt.h:155: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. memcpy(p, tmp, rem); data/daa2iso-0.1.7e/src/tinflate.c:72:10: [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. unsigned char length_bits[30]; data/daa2iso-0.1.7e/src/tinflate.c:76:10: [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. unsigned char dist_bits[30]; data/daa2iso-0.1.7e/src/tinflate.c:228: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. unsigned char lengths[288+32]; data/daa2iso-0.1.7e/src/daa2iso.c:210:25: [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(!p || (p && (strlen(p) != 4))) strcat(argv[2], ".iso"); data/daa2iso-0.1.7e/src/daa2iso.c:448:32: [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(!p) p = filei + strlen(filei); data/daa2iso-0.1.7e/src/daa2iso.c:704:32: [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(!p) p = suggested + strlen(suggested); data/daa2iso-0.1.7e/src/daa2iso.c:732:14: [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(fname); data/daa2iso-0.1.7e/src/daa2iso.c:733:14: [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). extlen = strlen(ext); data/daa2iso-0.1.7e/src/daa2iso.c:751:34: [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). toadd = multi_filename + strlen(multi_filename); data/daa2iso-0.1.7e/src/daa_crypt.h:39:15: [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). passlen = strlen(pass); ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 3160 in approximately 0.10 seconds (31806 lines/second) Physical Source Lines of Code (SLOC) = 2356 Hits@level = [0] 38 [1] 7 [2] 19 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 65 [1+] 27 [2+] 20 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 27.5891 [1+] 11.4601 [2+] 8.48896 [3+] 0.424448 [4+] 0.424448 [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.