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/fische-3.2.2/src/pulseaudio-samples.cpp Examining data/fische-3.2.2/src/ringbuffer.cpp Examining data/fische-3.2.2/src/samples.h Examining data/fische-3.2.2/src/wavepainter.h Examining data/fische-3.2.2/src/dummyaudio-samples.h Examining data/fische-3.2.2/src/analyst.h Examining data/fische-3.2.2/src/portaudio-samples.h Examining data/fische-3.2.2/src/vectorfield.cpp Examining data/fische-3.2.2/src/wavepainter.cpp Examining data/fische-3.2.2/src/busyindicator.h Examining data/fische-3.2.2/src/busyindicator.cpp Examining data/fische-3.2.2/src/configuration.cpp Examining data/fische-3.2.2/src/blurengine.cpp Examining data/fische-3.2.2/src/analyst.cpp Examining data/fische-3.2.2/src/ringbuffer.h Examining data/fische-3.2.2/src/vector.h Examining data/fische-3.2.2/src/sdlscreen.cpp Examining data/fische-3.2.2/src/traditional.c Examining data/fische-3.2.2/src/sdlscreen.h Examining data/fische-3.2.2/src/pulseaudio-samples.h Examining data/fische-3.2.2/src/alsa-samples.cpp Examining data/fische-3.2.2/src/dummyaudio-samples.cpp Examining data/fische-3.2.2/src/blur.h Examining data/fische-3.2.2/src/blurengine.h Examining data/fische-3.2.2/src/configuration.h Examining data/fische-3.2.2/src/main.cpp Examining data/fische-3.2.2/src/traditional.h Examining data/fische-3.2.2/src/vectorfield.h Examining data/fische-3.2.2/src/driver.h Examining data/fische-3.2.2/src/alsa-samples.h Examining data/fische-3.2.2/src/portaudio-samples.cpp FINAL RESULTS: data/fische-3.2.2/src/configuration.cpp:328:4: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf (line, "%s = %s", option, value); data/fische-3.2.2/src/configuration.cpp:69:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ( (c = getopt_long (count, args, "g:v:d:D:fs:1pneh", long_options, &option_index)) != -1) { data/fische-3.2.2/src/configuration.cpp:310:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *homedir = getenv ("USERPROFILE"); data/fische-3.2.2/src/configuration.cpp:312:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *homedir = getenv ("HOME"); data/fische-3.2.2/src/configuration.cpp:352:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *homedir = getenv ("USERPROFILE"); data/fische-3.2.2/src/configuration.cpp:354:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *homedir = getenv ("HOME"); data/fische-3.2.2/src/main.cpp:63:2: [3] (random) srand: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srand (time (NULL)); data/fische-3.2.2/src/blurengine.cpp:143:3: [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 (pixels + (y + m_Y0) * pitch + m_X0, src + y * m_Width, m_Width * 4); data/fische-3.2.2/src/configuration.cpp:38:2: [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 ( (char*) mp_AudioDevice, "default"); data/fische-3.2.2/src/configuration.cpp:322: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 line[256]; data/fische-3.2.2/src/configuration.cpp:323: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 option[256]; data/fische-3.2.2/src/configuration.cpp:324: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 value[256]; data/fische-3.2.2/src/configuration.cpp:457:2: [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 cpuid[13]; data/fische-3.2.2/src/portaudio-samples.cpp:62:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int index = atoi (device); data/fische-3.2.2/src/ringbuffer.cpp:68:14: [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 (d >= n) memcpy (mp_Buffer + m_Cursor, src, n); data/fische-3.2.2/src/ringbuffer.cpp:70:3: [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 (mp_Buffer + m_Cursor, src, d); data/fische-3.2.2/src/ringbuffer.cpp:71:3: [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 (mp_Buffer, src + d, n - d); data/fische-3.2.2/src/ringbuffer.cpp:86:2: [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 (mp_ExportBuffer, mp_Buffer + m_Cursor, d); data/fische-3.2.2/src/ringbuffer.cpp:87:2: [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 (mp_ExportBuffer + d, mp_Buffer, m_Size - d); data/fische-3.2.2/src/alsa-samples.cpp:111:41: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. else if ( (n == -EAGAIN) || (n == 0)) usleep (1000); data/fische-3.2.2/src/busyindicator.cpp:64:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (10000); data/fische-3.2.2/src/busyindicator.cpp:86:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (10000); data/fische-3.2.2/src/configuration.cpp:237:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy ( (char*) mp_AudioDevice, value, 64); data/fische-3.2.2/src/configuration.cpp:326:8: [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 (line) < 3) continue; data/fische-3.2.2/src/configuration.cpp:458:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (cpuid, (char*) &ebx, 4); data/fische-3.2.2/src/configuration.cpp:459:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (cpuid + 4, (char*) &edx, 4); data/fische-3.2.2/src/configuration.cpp:460:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (cpuid + 8, (char*) &ecx, 4); data/fische-3.2.2/src/dummyaudio-samples.cpp:48:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (1000); data/fische-3.2.2/src/main.cpp:136:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (10000); data/fische-3.2.2/src/main.cpp:143:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (1000); data/fische-3.2.2/src/portaudio-samples.cpp:74:37: [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 (strncmp (info->name, device, strlen (device)) == 0) { data/fische-3.2.2/src/portaudio-samples.cpp:106:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep (100000); data/fische-3.2.2/src/ringbuffer.cpp:65:21: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. while (m_IsLocked) usleep (89); data/fische-3.2.2/src/ringbuffer.cpp:83:21: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. while (m_IsLocked) usleep (97); ANALYSIS SUMMARY: Hits = 34 Lines analyzed = 3309 in approximately 0.18 seconds (18456 lines/second) Physical Source Lines of Code (SLOC) = 2279 Hits@level = [0] 3 [1] 15 [2] 12 [3] 6 [4] 1 [5] 0 Hits@level+ = [0+] 37 [1+] 34 [2+] 19 [3+] 7 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 16.2352 [1+] 14.9188 [2+] 8.33699 [3+] 3.07152 [4+] 0.438789 [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.