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/morris-0.2/src/mainapp.cc
Examining data/morris-0.2/src/boardgui.cc
Examining data/morris-0.2/src/ttable.cc
Examining data/morris-0.2/src/gtk_movelog.cc
Examining data/morris-0.2/src/gconf_configmgr.cc
Examining data/morris-0.2/src/gtk_threadtunnel.cc
Examining data/morris-0.2/src/rules.cc
Examining data/morris-0.2/src/boardspec.cc
Examining data/morris-0.2/src/gettext.h
Examining data/morris-0.2/src/control.cc
Examining data/morris-0.2/src/algo_alphabeta.cc
Examining data/morris-0.2/src/morris.cc
Examining data/morris-0.2/src/board.cc
Examining data/morris-0.2/src/algo_random.cc
Examining data/morris-0.2/src/gtkcairo_boardgui.cc
Examining data/morris-0.2/src/gtk_prefRules.cc
Examining data/morris-0.2/src/gtk_appgui.cc
Examining data/morris-0.2/src/configmgr.cc
Examining data/morris-0.2/src/app_configmgr.cc
Examining data/morris-0.2/src/appgtk_configmgr.cc
Examining data/morris-0.2/src/gtk_menutoolbar.cc
Examining data/morris-0.2/src/gtk_prefAI.cc
Examining data/morris-0.2/src/gtk_prefDisplay.cc

FINAL RESULTS:

data/morris-0.2/src/algo_alphabeta.cc:600:25:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      if (winInMoves>1) sprintf(buf, _("%s wins in %d moves)"), player, winInMoves);
data/morris-0.2/src/algo_alphabeta.cc:601:25:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      else              sprintf(buf, _("%s wins the next move)"), player, winInMoves);
data/morris-0.2/src/morris.cc:30:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  srand(time(NULL));
data/morris-0.2/src/algo_alphabeta.cc:599: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[100];
data/morris-0.2/src/board.cc:246: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 p[3];
data/morris-0.2/src/boardgui.cc:103: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[100];
data/morris-0.2/src/boardgui.cc:104: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(buf,_("You make take %d opponent piece(s)."),nTakes);
data/morris-0.2/src/boardspec.cc:271: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.
  const char (*geometry)[2];
data/morris-0.2/src/gettext.h:201: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_ctxt_id[msgctxt_len + msgid_len];
data/morris-0.2/src/gettext.h:203: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[1024];
data/morris-0.2/src/gettext.h:211:7:  [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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/morris-0.2/src/gettext.h:213:7:  [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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/morris-0.2/src/gettext.h:247: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_ctxt_id[msgctxt_len + msgid_len];
data/morris-0.2/src/gettext.h:249: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[1024];
data/morris-0.2/src/gettext.h:257:7:  [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 (msg_ctxt_id, msgctxt, msgctxt_len - 1);
data/morris-0.2/src/gettext.h:259:7:  [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 (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
data/morris-0.2/src/gtkcairo_boardgui.cc:554: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 coord[2];
data/morris-0.2/src/gtkcairo_boardgui.cc:566:6:  [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 coord[2];
data/morris-0.2/src/gtkcairo_boardgui.cc:593:6:  [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 coord[2];
data/morris-0.2/src/gconf_configmgr.cc:36: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).
  return &gconfpath[ strlen(prefix)+1 ];
data/morris-0.2/src/gettext.h:197:24:  [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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/morris-0.2/src/gettext.h:198: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).
  size_t msgid_len = strlen (msgid) + 1;
data/morris-0.2/src/gettext.h:243:24:  [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).
  size_t msgctxt_len = strlen (msgctxt) + 1;
data/morris-0.2/src/gettext.h:244: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).
  size_t msgid_len = strlen (msgid) + 1;

ANALYSIS SUMMARY:

Hits = 24
Lines analyzed = 7409 in approximately 0.18 seconds (42266 lines/second)
Physical Source Lines of Code (SLOC) = 5182
Hits@level = [0]   0 [1]   5 [2]  16 [3]   1 [4]   2 [5]   0
Hits@level+ = [0+]  24 [1+]  24 [2+]  19 [3+]   3 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 4.63142 [1+] 4.63142 [2+] 3.66654 [3+] 0.578927 [4+] 0.385951 [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.