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/japa-0.9.2/source/audio.cc Examining data/japa-0.9.2/source/rngen.h Examining data/japa-0.9.2/source/audio.h Examining data/japa-0.9.2/source/mainwin.cc Examining data/japa-0.9.2/source/rngen.cc Examining data/japa-0.9.2/source/gobjects.cc Examining data/japa-0.9.2/source/styles.h Examining data/japa-0.9.2/source/mainwin.h Examining data/japa-0.9.2/source/analyser.cc Examining data/japa-0.9.2/source/japa.cc Examining data/japa-0.9.2/source/analyser.h Examining data/japa-0.9.2/source/styles.cc Examining data/japa-0.9.2/source/messages.h Examining data/japa-0.9.2/source/gobjects.h FINAL RESULTS: data/japa-0.9.2/source/mainwin.cc:635:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (s, "%s-%s [%s]", PROGNAME, VERSION, Z->_name); data/japa-0.9.2/source/audio.cc:132:32: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (_inputB == _inputA) memcpy (_dataB + _dind, _dataA + _dind, n * sizeof (float)); data/japa-0.9.2/source/audio.cc:145:32: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (_inputB == _inputA) memcpy (_dataB + _dind, _dataA + _dind, m * sizeof (float)); data/japa-0.9.2/source/audio.cc:182: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 s [16]; data/japa-0.9.2/source/audio.cc:208:9: [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(s, "in_%d", i + 1); data/japa-0.9.2/source/audio.cc:267: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 (_dataA + _dind, pA, sizeof(float) * n); data/japa-0.9.2/source/audio.cc:273: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 (_dataB + _dind, pB, sizeof(float) * n); data/japa-0.9.2/source/audio.cc:283:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (pA) memcpy (_dataA + _dind, pA, sizeof(float) * m); data/japa-0.9.2/source/audio.cc:285:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (pB) memcpy (_dataB + _dind, pB, sizeof(float) * m); data/japa-0.9.2/source/gobjects.cc:121: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 s [8]; data/japa-0.9.2/source/gobjects.cc:129: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 (s, "Input %c", 'A' + k); data/japa-0.9.2/source/gobjects.cc:140:2: [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 (s, "%d", i + 1); data/japa-0.9.2/source/gobjects.cc:176: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 s [8]; data/japa-0.9.2/source/gobjects.cc:179: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 (s, "%2.0lf", gain); data/japa-0.9.2/source/gobjects.cc:267: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 s [8]; data/japa-0.9.2/source/gobjects.cc:275: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 (s, "Store %c", 'A' + k); data/japa-0.9.2/source/japa.cc:32: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. #define CP (char *) data/japa-0.9.2/source/mainwin.cc:347: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 p [8]; data/japa-0.9.2/source/mainwin.cc:364:9: [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 (p, "%d", _ytick * (1 - i)); data/japa-0.9.2/source/mainwin.cc:369:9: [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 (p, "%d", _ytick * (n / 2 - i)); data/japa-0.9.2/source/mainwin.cc:629: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 s [256]; data/japa-0.9.2/source/mainwin.h:124:18: [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 const char *_flogstr [31]; data/japa-0.9.2/source/mainwin.h:125:18: [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 const char *_f440str [31]; data/japa-0.9.2/source/rngen.cc:50:10: [2] (misc) open: 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 = open ("/dev/urandom", O_RDONLY); data/japa-0.9.2/source/rngen.cc:54:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). k = read (fd, p, n); ANALYSIS SUMMARY: Hits = 25 Lines analyzed = 2860 in approximately 0.09 seconds (33126 lines/second) Physical Source Lines of Code (SLOC) = 2100 Hits@level = [0] 26 [1] 1 [2] 23 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 51 [1+] 25 [2+] 24 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 24.2857 [1+] 11.9048 [2+] 11.4286 [3+] 0.47619 [4+] 0.47619 [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.