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/videogen-0.33/cfg.yy.c Examining data/videogen-0.33/checks.c Examining data/videogen-0.33/cfg.tab.c Examining data/videogen-0.33/cfg.tab.h Examining data/videogen-0.33/args.c Examining data/videogen-0.33/config.h Examining data/videogen-0.33/misc.c Examining data/videogen-0.33/videogen.h Examining data/videogen-0.33/videogen.c FINAL RESULTS: data/videogen-0.33/cfg.tab.c:571:21: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. # define YYFPRINTF fprintf data/videogen-0.33/misc.c:46:13: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printed = vfprintf (stderr, fmt, vl); data/videogen-0.33/misc.c:50:13: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printed = vfprintf (stderr, fmt, vl); data/videogen-0.33/misc.c:72:3: [4] (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). strcpy (expath, tpath); data/videogen-0.33/misc.c:86:5: [4] (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). strcpy (expath, tpath); data/videogen-0.33/misc.c:89:5: [4] (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). strcpy (expath, pw->pw_dir); data/videogen-0.33/misc.c:90:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (expath, (char *)(tpath + pos + 1)); data/videogen-0.33/misc.c:96:5: [4] (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). strcpy (expath, tpath); data/videogen-0.33/misc.c:99:5: [4] (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). strcpy (expath, pw->pw_dir); data/videogen-0.33/misc.c:100:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat (expath, (char *)(tpath + pos + 1)); data/videogen-0.33/cfg.yy.c:733:17: [2] (integer) atol: 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). { yylval.ival = atol (yytext); data/videogen-0.33/misc.c:65: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 uname[16]; data/videogen-0.33/videogen.c:98: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 pathname_buf[4096]; data/videogen-0.33/videogen.c:128:10: [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). yyin = fopen (tpathexp (cfgfile, (char *)&pathname_buf), "r"); data/videogen-0.33/cfg.tab.c:618:21: [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). # define yystrlen strlen data/videogen-0.33/cfg.yy.c:572:14: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ data/videogen-0.33/misc.c:71: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). if ((tpath == NULL) || (strlen (tpath) == 0) || (tpath[0] != '~')) ANALYSIS SUMMARY: Hits = 17 Lines analyzed = 5563 in approximately 0.15 seconds (37161 lines/second) Physical Source Lines of Code (SLOC) = 3663 Hits@level = [0] 5 [1] 3 [2] 4 [3] 0 [4] 10 [5] 0 Hits@level+ = [0+] 22 [1+] 17 [2+] 14 [3+] 10 [4+] 10 [5+] 0 Hits/KSLOC@level+ = [0+] 6.00601 [1+] 4.641 [2+] 3.822 [3+] 2.73 [4+] 2.73 [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.