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/spim-8.0+dfsg/spim/spim.c
Examining data/spim-8.0+dfsg/CPU/scanner.h
Examining data/spim-8.0+dfsg/CPU/inst.c
Examining data/spim-8.0+dfsg/CPU/mem.h
Examining data/spim-8.0+dfsg/CPU/op.h
Examining data/spim-8.0+dfsg/CPU/string-stream.h
Examining data/spim-8.0+dfsg/CPU/spim-utils.h
Examining data/spim-8.0+dfsg/CPU/parser.h
Examining data/spim-8.0+dfsg/CPU/data.h
Examining data/spim-8.0+dfsg/CPU/spim-syscall.h
Examining data/spim-8.0+dfsg/CPU/sym-tbl.h
Examining data/spim-8.0+dfsg/CPU/string-stream.c
Examining data/spim-8.0+dfsg/CPU/syscall.h
Examining data/spim-8.0+dfsg/CPU/endian.c
Examining data/spim-8.0+dfsg/CPU/mem.c
Examining data/spim-8.0+dfsg/CPU/reg.h
Examining data/spim-8.0+dfsg/CPU/spim.h
Examining data/spim-8.0+dfsg/CPU/run.h
Examining data/spim-8.0+dfsg/CPU/inst.h
Examining data/spim-8.0+dfsg/CPU/spim-utils.c
Examining data/spim-8.0+dfsg/CPU/sym-tbl.c
Examining data/spim-8.0+dfsg/CPU/dump_ops.c
Examining data/spim-8.0+dfsg/CPU/data.c
Examining data/spim-8.0+dfsg/CPU/syscall.c
Examining data/spim-8.0+dfsg/CPU/display-utils.c
Examining data/spim-8.0+dfsg/CPU/run.c
Examining data/spim-8.0+dfsg/xspim/xspim.h
Examining data/spim-8.0+dfsg/xspim/buttons.h
Examining data/spim-8.0+dfsg/xspim/buttons.c
Examining data/spim-8.0+dfsg/xspim/xspim.c
Examining data/spim-8.0+dfsg/xspim/windows.h
Examining data/spim-8.0+dfsg/xspim/windows.c

FINAL RESULTS:

data/spim-8.0+dfsg/CPU/spim-utils.c:501:1:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
vsprintf (str, fmt, args)
data/spim-8.0+dfsg/CPU/spim-utils.c:571:11:  [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).
  return (strcpy (xmalloc (strlen (str) + 1), str));
data/spim-8.0+dfsg/CPU/string-stream.c:122:16:  [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.
   while ((n = vsnprintf (ss->buf + ss->empty_pos, free_space, fmt, args)) >= free_space)
data/spim-8.0+dfsg/spim/spim.c:883:3:  [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.
  vfprintf (stderr, fmt, args);
data/spim-8.0+dfsg/spim/spim.c:901:3:  [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.
  vfprintf (stderr, fmt, args);
data/spim-8.0+dfsg/spim/spim.c:921:3:  [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.
  vfprintf (stderr, fmt, args);
data/spim-8.0+dfsg/spim/spim.c:952:7:  [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.
      vfprintf (f, fmt, args);
data/spim-8.0+dfsg/spim/spim.c:961:7:  [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.
      vfprintf (stdout, fmt, args);
data/spim-8.0+dfsg/xspim/xspim.c:779:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf (io_buffer, fmt, args);
data/spim-8.0+dfsg/xspim/xspim.c:934:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf (io_buffer, fmt, args);
data/spim-8.0+dfsg/xspim/xspim.c:955:3:  [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.
  vfprintf (stderr, fmt, args);
data/spim-8.0+dfsg/xspim/xspim.c:968:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf (io_buffer, fmt, args);
data/spim-8.0+dfsg/spim/spim.c:155: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 ("SPIM_EXCEPTION_HANDLER") != NULL)
data/spim-8.0+dfsg/spim/spim.c:156:27:  [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.
    exception_file_name = getenv ("SPIM_EXCEPTION_HANDLER");
data/spim-8.0+dfsg/xspim/xspim.c:425: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 ("SPIM_EXCEPTION_HANDLER") != NULL)
data/spim-8.0+dfsg/xspim/xspim.c:426:27:  [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.
    exception_file_name = getenv("SPIM_EXCEPTION_HANDLER");
data/spim-8.0+dfsg/CPU/run.c:64:6:  [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).
long atol (const char *);
data/spim-8.0+dfsg/CPU/spim-utils.c:198:16:  [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 *file = fopen (name, "rt");
data/spim-8.0+dfsg/CPU/spim.h:71:9:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(T, F, S) bcopy((void*)F, (void*)T, S)
data/spim-8.0+dfsg/CPU/spim.h:71:25:  [2] (buffer) bcopy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define memcpy(T, F, S) bcopy((void*)F, (void*)T, S)
data/spim-8.0+dfsg/CPU/sym-tbl.c:503: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 (buffer + string_length, l->name, name_length);
data/spim-8.0+dfsg/CPU/syscall.c:91:9:  [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.
	static char str [256];
data/spim-8.0+dfsg/CPU/syscall.c:94:15:  [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).
	R[REG_RES] = atol (str);
data/spim-8.0+dfsg/CPU/syscall.c:100:9:  [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.
	static char str [256];
data/spim-8.0+dfsg/CPU/syscall.c:109:9:  [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.
	static char str [256];
data/spim-8.0+dfsg/CPU/syscall.c:118:16:  [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.
	read_input ( (char *) mem_reference (R[REG_A0]), R[REG_A1]);
data/spim-8.0+dfsg/CPU/syscall.c:138:9:  [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.
	static char str [2];
data/spim-8.0+dfsg/CPU/syscall.c:159:15:  [2] (misc) open:
  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).
	R[REG_RES] = open(mem_reference (R[REG_A0]), R[REG_A1], R[REG_A2]);
data/spim-8.0+dfsg/spim/spim.c:232:24:  [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).
	{ initial_text_size = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:235:24:  [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).
	{ initial_data_size = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:238:25:  [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).
	{ initial_data_limit = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:241:25:  [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).
	{ initial_stack_size = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:244:26:  [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).
	{ initial_stack_limit = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:247:26:  [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).
	{ initial_k_text_size = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:250:26:  [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).
	{ initial_k_data_size = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:253:27:  [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).
	{ initial_k_data_limit = atoi (argv[++i]); }
data/spim-8.0+dfsg/spim/spim.c:662: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).
        fp = fopen (filename, "wb");
data/spim-8.0+dfsg/spim/spim.c:823: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 s[100];
data/spim-8.0+dfsg/spim/spim.c:990:7:  [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 buf[1];
data/spim-8.0+dfsg/xspim/buttons.c:379: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 sa[20];
data/spim-8.0+dfsg/xspim/buttons.c:383:7:  [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 (sa, "0x%08x", starting_address ());
data/spim-8.0+dfsg/xspim/buttons.c:429: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 *argv[MAX_ARGS];
data/spim-8.0+dfsg/xspim/buttons.c:505:11:  [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).
  steps = atoi (st);
data/spim-8.0+dfsg/xspim/buttons.c:1048: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 msg[256];
data/spim-8.0+dfsg/xspim/buttons.c:1061:5:  [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 (msg, "execution interrupt at 0x%08x", PC);
data/spim-8.0+dfsg/xspim/buttons.c:1063:5:  [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 (msg, "breakpoint encountered at 0x%08x", PC);
data/spim-8.0+dfsg/xspim/xspim.c:466:25:  [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).
    initial_text_size = atoi (app_res.initial_text_size);
data/spim-8.0+dfsg/xspim/xspim.c:468:25:  [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).
    initial_data_size = atoi (app_res.initial_data_size);
data/spim-8.0+dfsg/xspim/xspim.c:470:26:  [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).
    initial_data_limit = atoi (app_res.initial_data_limit);
data/spim-8.0+dfsg/xspim/xspim.c:472:26:  [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).
    initial_stack_size = atoi (app_res.initial_stack_size);
data/spim-8.0+dfsg/xspim/xspim.c:474:27:  [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).
    initial_stack_limit = atoi (app_res.initial_stack_limit);
data/spim-8.0+dfsg/xspim/xspim.c:476:27:  [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).
    initial_k_text_size = atoi (app_res.initial_k_text_size);
data/spim-8.0+dfsg/xspim/xspim.c:478:27:  [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).
    initial_k_data_size = atoi (app_res.initial_k_data_size);
data/spim-8.0+dfsg/xspim/xspim.c:480:28:  [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).
    initial_k_data_limit = atoi (app_res.initial_k_data_limit);
data/spim-8.0+dfsg/xspim/xspim.c:687: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 buf[100];
data/spim-8.0+dfsg/xspim/xspim.c:697:3:  [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 (buf, "\n[0x%08x]", PC);
data/spim-8.0+dfsg/xspim/xspim.c:768: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 io_buffer [IO_BUFFSIZE];
data/spim-8.0+dfsg/xspim/xspim.c:800: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 buffer[11];
data/spim-8.0+dfsg/xspim/xspim.c:877:4:  [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[11];
data/spim-8.0+dfsg/xspim/xspim.c:911: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 buf[4];
data/spim-8.0+dfsg/xspim/xspim.c:931: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 io_buffer [IO_BUFFSIZE];
data/spim-8.0+dfsg/xspim/xspim.c:965: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 io_buffer [IO_BUFFSIZE];
data/spim-8.0+dfsg/CPU/run.c:73:57:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
static void set_fpu_cc (int cond, int cc, int less, int equal, int unordered);
data/spim-8.0+dfsg/CPU/run.c:1802:45:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
set_fpu_cc (int cond, int cc, int less, int equal, int unordered)
data/spim-8.0+dfsg/CPU/run.c:1809:33:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
  if (cond & COND_EQ) result |= equal;
data/spim-8.0+dfsg/CPU/spim-utils.c:288:11:  [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).
  int i = strlen (s);
data/spim-8.0+dfsg/CPU/spim-utils.c:571:28:  [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).
  return (strcpy (xmalloc (strlen (str) + 1), str));
data/spim-8.0+dfsg/CPU/sym-tbl.c:496:20:  [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).
	int name_length = strlen(l->name);
data/spim-8.0+dfsg/CPU/syscall.c:171:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	R[REG_RES] = read(R[REG_A0], mem_reference (R[REG_A1]), R[REG_A2]);
data/spim-8.0+dfsg/spim/spim.c:991:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (read ((int) console_in.i, buf, 1) <= 0) /* Not in raw mode! */
data/spim-8.0+dfsg/spim/spim.c:1085:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read ((int) console_in.i, &buf, 1);
data/spim-8.0+dfsg/xspim/buttons.c:688:7:  [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 (value_str) == 3
data/spim-8.0+dfsg/xspim/xspim.c:699: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).
  text.length = strlen (buf);
data/spim-8.0+dfsg/xspim/xspim.c:834:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	      strncpy (ptr, buffer, n);
data/spim-8.0+dfsg/xspim/xspim.c:985:13:  [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 (!s || strlen (s) == 0) return;
data/spim-8.0+dfsg/xspim/xspim.c:988:22:  [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).
  textblock.length = strlen (s);

ANALYSIS SUMMARY:

Hits = 76
Lines analyzed = 12268 in approximately 0.30 seconds (40317 lines/second)
Physical Source Lines of Code (SLOC) = 8414
Hits@level = [0]  25 [1]  14 [2]  46 [3]   4 [4]  12 [5]   0
Hits@level+ = [0+] 101 [1+]  76 [2+]  62 [3+]  16 [4+]  12 [5+]   0
Hits/KSLOC@level+ = [0+] 12.0038 [1+] 9.03256 [2+] 7.36867 [3+] 1.90159 [4+] 1.42619 [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.