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/plotdrop-0.5.4/droplist.c Examining data/plotdrop-0.5.4/droplist.h Examining data/plotdrop-0.5.4/gnuplot.c Examining data/plotdrop-0.5.4/gnuplot.h Examining data/plotdrop-0.5.4/main.c Examining data/plotdrop-0.5.4/plotdata.h FINAL RESULTS: data/plotdrop-0.5.4/gnuplot.c:23:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. extern FILE *popen (__const char *__command, __const char *__modes); data/plotdrop-0.5.4/gnuplot.c:88:19: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *instance = popen (command, "r"); data/plotdrop-0.5.4/gnuplot.c:101:14: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. instance = popen (command, "r"); data/plotdrop-0.5.4/gnuplot.c:270:15: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *prog = popen ("gnuplot --version", "r"); data/plotdrop-0.5.4/gnuplot.c:289:2: [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 (outp, "gnuplot %s\n", version); data/plotdrop-0.5.4/gnuplot.c:43: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 scriptname[256]; data/plotdrop-0.5.4/gnuplot.c:45:21: [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 *plotscript = fopen (scriptname, "wx"); data/plotdrop-0.5.4/gnuplot.c:81: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 command[512]; data/plotdrop-0.5.4/gnuplot.c:276: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 outp[255]; data/plotdrop-0.5.4/gnuplot.c:291: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 (version) == 0) ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 1395 in approximately 0.04 seconds (32712 lines/second) Physical Source Lines of Code (SLOC) = 1029 Hits@level = [0] 57 [1] 1 [2] 4 [3] 0 [4] 5 [5] 0 Hits@level+ = [0+] 67 [1+] 10 [2+] 9 [3+] 5 [4+] 5 [5+] 0 Hits/KSLOC@level+ = [0+] 65.1118 [1+] 9.71817 [2+] 8.74636 [3+] 4.85909 [4+] 4.85909 [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.