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/audtty-0.1.12/settings.h Examining data/audtty-0.1.12/browse.h Examining data/audtty-0.1.12/main.c Examining data/audtty-0.1.12/playlist_jump.h Examining data/audtty-0.1.12/playlist_create.c Examining data/audtty-0.1.12/playlist_addurl.h Examining data/audtty-0.1.12/browse.c Examining data/audtty-0.1.12/settings.c Examining data/audtty-0.1.12/playlist.h Examining data/audtty-0.1.12/curses_printf.c Examining data/audtty-0.1.12/curses_printf.h Examining data/audtty-0.1.12/playlist_addurl.c Examining data/audtty-0.1.12/dbus.h Examining data/audtty-0.1.12/connect.h Examining data/audtty-0.1.12/playlist_jump.c Examining data/audtty-0.1.12/playlist.c Examining data/audtty-0.1.12/kbd_constants.h Examining data/audtty-0.1.12/playlist_create.h Examining data/audtty-0.1.12/connect.c Examining data/audtty-0.1.12/main.h FINAL RESULTS: data/audtty-0.1.12/curses_printf.c:36:7: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. n = vsnprintf (p, size, fmt, ap); data/audtty-0.1.12/connect.c:54:16: [3] (buffer) g_get_home_dir: This function is synonymous with 'getenv("HOME")';it returns untrustable input if the environment can beset by an attacker. It 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. dbus=g_strdup(g_get_home_dir()); data/audtty-0.1.12/settings.c:173:19: [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. gchar *homedir = getenv("HOME"); data/audtty-0.1.12/connect.c:66:12: [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). filename=fopen(dbus,"r"); data/audtty-0.1.12/playlist_create.c:51:46: [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). file=fopen(buffer,"w"); data/audtty-0.1.12/settings.c:100:4: [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(tmp, "-%c", cmd); data/audtty-0.1.12/settings.c:157:13: [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). FILE *fd = fopen(file, "r"); data/audtty-0.1.12/main.c:128: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(500000); data/audtty-0.1.12/main.c:166: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(25000); data/audtty-0.1.12/main.c:364:27: [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). mvwaddch(win, y, width/2-strlen(label)/2-1, ' '); data/audtty-0.1.12/playlist.c:47:6: [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(list.song[song].title) == 0) { data/audtty-0.1.12/playlist_jump.c:45:5: [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(string) == 0) return 1; data/audtty-0.1.12/settings.c:135: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). end = line+strlen(line)-1; data/audtty-0.1.12/settings.c:178:17: [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). gint length = strlen(homedir) + strlen("/.audtty") + 1; data/audtty-0.1.12/settings.c:178:35: [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). gint length = strlen(homedir) + strlen("/.audtty") + 1; ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 2137 in approximately 0.08 seconds (28233 lines/second) Physical Source Lines of Code (SLOC) = 1560 Hits@level = [0] 12 [1] 8 [2] 4 [3] 2 [4] 1 [5] 0 Hits@level+ = [0+] 27 [1+] 15 [2+] 7 [3+] 3 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 17.3077 [1+] 9.61538 [2+] 4.48718 [3+] 1.92308 [4+] 0.641026 [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.