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/samblaster-0.1.26/samblaster.cpp Examining data/samblaster-0.1.26/sbhash.cpp Examining data/samblaster-0.1.26/sbhash.h FINAL RESULTS: data/samblaster-0.1.26/samblaster.cpp:48:20: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. return (char*) memcpy(dest, src, n) + n; data/samblaster-0.1.26/samblaster.cpp:325: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(fp, newValue, newLen); data/samblaster-0.1.26/samblaster.cpp:518:1: [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 tempBuf[10]; data/samblaster-0.1.26/samblaster.cpp:522:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tempBuf, "%d", line->flag); data/samblaster-0.1.26/samblaster.cpp:1743:28: [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). state->inputFile = fopen(state->inputFileName, "r"); data/samblaster-0.1.26/samblaster.cpp:1753:29: [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). state->outputFile = fopen(state->outputFileName, "w"); data/samblaster-0.1.26/samblaster.cpp:1759:33: [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). state->discordantFile = fopen(state->discordantFileName, "w"); data/samblaster-0.1.26/samblaster.cpp:1765:31: [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). state->splitterFile = fopen(state->splitterFileName, "w"); data/samblaster-0.1.26/samblaster.cpp:1771:38: [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). state->unmappedClippedFile = fopen(state->unmappedClippedFileName, "w"); data/samblaster-0.1.26/samblaster.cpp:302:18: [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). int oldLen = strlen(fp); data/samblaster-0.1.26/samblaster.cpp:303:18: [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). int newLen = strlen(newValue); data/samblaster-0.1.26/samblaster.cpp:330: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). int hl = strlen(header); data/samblaster-0.1.26/samblaster.cpp:331: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). int vl = strlen(val); data/samblaster-0.1.26/samblaster.cpp:368:31: [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). retval = strdup (startptr+strlen(tagID)); data/samblaster-0.1.26/samblaster.cpp:1479:26: [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). int typeLength = strlen(orphanString); ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 2315 in approximately 0.08 seconds (28417 lines/second) Physical Source Lines of Code (SLOC) = 1655 Hits@level = [0] 66 [1] 6 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 81 [1+] 15 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 48.9426 [1+] 9.06344 [2+] 5.43807 [3+] 0 [4+] 0 [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.