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/scheme2c-2012.10.14/cdecl/sizeof.c
Examining data/scheme2c-2012.10.14/ports/AMD64/options-server.h
Examining data/scheme2c-2012.10.14/ports/AMD64/options.h
Examining data/scheme2c-2012.10.14/ports/AOSF/options-server.h
Examining data/scheme2c-2012.10.14/ports/AOSF/options.h
Examining data/scheme2c-2012.10.14/ports/ARM/options.h
Examining data/scheme2c-2012.10.14/ports/DECMIPS/options-server.h
Examining data/scheme2c-2012.10.14/ports/DECMIPS/options.h
Examining data/scheme2c-2012.10.14/ports/FREEBSD/options-server.h
Examining data/scheme2c-2012.10.14/ports/FREEBSD/options.h
Examining data/scheme2c-2012.10.14/ports/HP300/options-server.h
Examining data/scheme2c-2012.10.14/ports/HP300/options.h
Examining data/scheme2c-2012.10.14/ports/HP700/options-server.h
Examining data/scheme2c-2012.10.14/ports/HP700/options.h
Examining data/scheme2c-2012.10.14/ports/LINUX/options-server.h
Examining data/scheme2c-2012.10.14/ports/LINUX/options.h
Examining data/scheme2c-2012.10.14/ports/MAC/options.h
Examining data/scheme2c-2012.10.14/ports/MAC/unpack.c
Examining data/scheme2c-2012.10.14/ports/OPENBSD/options-server.h
Examining data/scheme2c-2012.10.14/ports/OPENBSD/options.h
Examining data/scheme2c-2012.10.14/ports/SUNOS4/options-server.h
Examining data/scheme2c-2012.10.14/ports/SUNOS4/options.h
Examining data/scheme2c-2012.10.14/ports/SUNOS4/sparc-pragma.h
Examining data/scheme2c-2012.10.14/ports/SUNOS5/options-server.h
Examining data/scheme2c-2012.10.14/ports/SUNOS5/options.h
Examining data/scheme2c-2012.10.14/ports/SUNOS5/sparc-pragma.h
Examining data/scheme2c-2012.10.14/ports/VAX/options-server.h
Examining data/scheme2c-2012.10.14/ports/VAX/options.h
Examining data/scheme2c-2012.10.14/scrt/apply.c
Examining data/scheme2c-2012.10.14/scrt/apply.h
Examining data/scheme2c-2012.10.14/scrt/callcc.c
Examining data/scheme2c-2012.10.14/scrt/callcc.h
Examining data/scheme2c-2012.10.14/scrt/cio.c
Examining data/scheme2c-2012.10.14/scrt/cio.h
Examining data/scheme2c-2012.10.14/scrt/em2.c
Examining data/scheme2c-2012.10.14/scrt/embedded.c
Examining data/scheme2c-2012.10.14/scrt/heap.c
Examining data/scheme2c-2012.10.14/scrt/heap.h
Examining data/scheme2c-2012.10.14/scrt/mtraps.c
Examining data/scheme2c-2012.10.14/scrt/objects.c
Examining data/scheme2c-2012.10.14/scrt/objects.h
Examining data/scheme2c-2012.10.14/scrt/options.h
Examining data/scheme2c-2012.10.14/scrt/scdebug.c
Examining data/scheme2c-2012.10.14/scrt/sceval.c
Examining data/scheme2c-2012.10.14/scrt/scexpand.c
Examining data/scheme2c-2012.10.14/scrt/scexpnd1.c
Examining data/scheme2c-2012.10.14/scrt/scexpnd2.c
Examining data/scheme2c-2012.10.14/scrt/sci.c
Examining data/scheme2c-2012.10.14/scrt/scinit.c
Examining data/scheme2c-2012.10.14/scrt/scinit.h
Examining data/scheme2c-2012.10.14/scrt/scqquote.c
Examining data/scheme2c-2012.10.14/scrt/screp.c
Examining data/scheme2c-2012.10.14/scrt/scrt1.c
Examining data/scheme2c-2012.10.14/scrt/scrt2.c
Examining data/scheme2c-2012.10.14/scrt/scrt3.c
Examining data/scheme2c-2012.10.14/scrt/scrt4.c
Examining data/scheme2c-2012.10.14/scrt/scrt5.c
Examining data/scheme2c-2012.10.14/scrt/scrt6.c
Examining data/scheme2c-2012.10.14/scrt/scrt7.c
Examining data/scheme2c-2012.10.14/scrt/scrtuser.c
Examining data/scheme2c-2012.10.14/scsc/callcode.c
Examining data/scheme2c-2012.10.14/scsc/closeana.c
Examining data/scheme2c-2012.10.14/scsc/compile.c
Examining data/scheme2c-2012.10.14/scsc/expform.c
Examining data/scheme2c-2012.10.14/scsc/gencode.c
Examining data/scheme2c-2012.10.14/scsc/lambdacode.c
Examining data/scheme2c-2012.10.14/scsc/lambdaexp.c
Examining data/scheme2c-2012.10.14/scsc/lap.c
Examining data/scheme2c-2012.10.14/scsc/macros.c
Examining data/scheme2c-2012.10.14/scsc/main.c
Examining data/scheme2c-2012.10.14/scsc/misccode.c
Examining data/scheme2c-2012.10.14/scsc/miscexp.c
Examining data/scheme2c-2012.10.14/scsc/plist.c
Examining data/scheme2c-2012.10.14/scsc/readtext.c
Examining data/scheme2c-2012.10.14/scsc/transform.c
Examining data/scheme2c-2012.10.14/test/test54c.c

FINAL RESULTS:

data/scheme2c-2012.10.14/ports/MAC/unpack.c:16:9:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	while (gets( line ) != NULL)  {
data/scheme2c-2012.10.14/ports/MAC/unpack.c:18:21:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	      out = fopen( gets( line ), "w" );
data/scheme2c-2012.10.14/ports/MAC/unpack.c:21:16:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	      while  (gets( line ) != NULL  &&  strcmp( line, "####END" ))  {
data/scheme2c-2012.10.14/scrt/em2.c:85:10:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	while  (gets( line ) != NULL)  {
data/scheme2c-2012.10.14/scrt/embedded.c:58:10:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	while  (gets( line ) != NULL  &&  line[0] != 0)  {
data/scheme2c-2012.10.14/scrt/embedded.c:97:10:  [5] (buffer) gets:
  Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead.
	while  (gets( line ) != NULL)  {
data/scheme2c-2012.10.14/scrt/cio.c:106:14:  [4] (shell) system:
  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  int  system();
data/scheme2c-2012.10.14/scrt/cio.c:501:8:  [4] (format) snprintf:
  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.
	      snprintf( buffer, sizeof(buffer), format, TSCP_DOUBLE( number ) );
data/scheme2c-2012.10.14/scrt/cio.c:506:8:  [4] (format) snprintf:
  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.
	      snprintf( buffer, sizeof(buffer), format, TSCP_DOUBLE( number ) );
data/scheme2c-2012.10.14/scrt/cio.c:512:8:  [4] (format) snprintf:
  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.
	      snprintf( buffer, sizeof(buffer), format, TSCP_DOUBLE( number ) );
data/scheme2c-2012.10.14/scrt/cio.c:822:23:  [4] (shell) system:
  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.
	return( S2CINT_TSCP( system( (char*)&STRING_CHAR( command, 0 ) ) ) );
data/scheme2c-2012.10.14/scrt/cio.c:104:16:  [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.
extern  char*  getenv();
data/scheme2c-2012.10.14/scrt/cio.c:549:10:  [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.
	return( getenv( name ) );
data/scheme2c-2012.10.14/scrt/cio.c:715:7:  [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.
	 if (getenv("SCMMAP")!=NULL) linux_mmap_hack = (0==0);}
data/scheme2c-2012.10.14/scrt/embedded.c:42:11:  [3] (misc) LoadLibrary:
  Ensure that the full path to the library is specified, or current directory
  may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to
  find library path, if you aren't already.
	s2clib = LoadLibrary( "scheme2c.dll" );
data/scheme2c-2012.10.14/ports/MAC/unpack.c:10: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  line[200], **ap;
data/scheme2c-2012.10.14/ports/MAC/unpack.c:18:14:  [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).
	      out = fopen( gets( line ), "w" );
data/scheme2c-2012.10.14/scrt/cio.c:58:1:  [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 overflow_stack[16384];
data/scheme2c-2012.10.14/scrt/cio.c:224: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  buffer[ 512 ];
data/scheme2c-2012.10.14/scrt/cio.c:288:6:  [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).
	f = fopen( (char*)&STRING_CHAR( filename, 0 ),
data/scheme2c-2012.10.14/scrt/cio.c:490: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  buffer[100],
data/scheme2c-2012.10.14/scrt/cio.c:613: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  buffer[30];
data/scheme2c-2012.10.14/scrt/cio.c:623: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  buffer[30];
data/scheme2c-2012.10.14/scrt/cio.c:635: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  s[2];
data/scheme2c-2012.10.14/scrt/cio.c:1143: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  buffer[ 50 ], *bp = buffer, *cp;
data/scheme2c-2012.10.14/scrt/em2.c:30:1:  [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[ 200 ],
data/scheme2c-2012.10.14/scrt/embedded.c:34: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  line[ 200 ],
data/scheme2c-2012.10.14/scrt/embedded.c:78: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  line[ 200 ],
data/scheme2c-2012.10.14/scrt/cio.c:338:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	character = getc( stream );
data/scheme2c-2012.10.14/scrt/cio.c:1067:6:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = getchar();

ANALYSIS SUMMARY:

Hits = 30
Lines analyzed = 70397 in approximately 1.58 seconds (44585 lines/second)
Physical Source Lines of Code (SLOC) = 62499
Hits@level = [0]  41 [1]   2 [2]  13 [3]   4 [4]   5 [5]   6
Hits@level+ = [0+]  71 [1+]  30 [2+]  28 [3+]  15 [4+]  11 [5+]   6
Hits/KSLOC@level+ = [0+] 1.13602 [1+] 0.480008 [2+] 0.448007 [3+] 0.240004 [4+] 0.176003 [5+] 0.0960015
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.