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/3dchess-0.8.1/src/piece.c
Examining data/3dchess-0.8.1/src/engine.c
Examining data/3dchess-0.8.1/src/init.c
Examining data/3dchess-0.8.1/src/stack.c
Examining data/3dchess-0.8.1/src/DrawingA.c
Examining data/3dchess-0.8.1/src/xif.c
Examining data/3dchess-0.8.1/src/xnet.c
Examining data/3dchess-0.8.1/src/callbaks.c
Examining data/3dchess-0.8.1/src/ai.c
Examining data/3dchess-0.8.1/src/main.c
Examining data/3dchess-0.8.1/include/3Dc.h
Examining data/3dchess-0.8.1/include/3DcErr.h
Examining data/3dchess-0.8.1/include/DrawingA.h
Examining data/3dchess-0.8.1/include/DrawingAP.h
Examining data/3dchess-0.8.1/include/local.h
Examining data/3dchess-0.8.1/include/x3Dc.h
Examining data/3dchess-0.8.1/include/machine.h

FINAL RESULTS:

data/3dchess-0.8.1/src/main.c:301:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(winString, "%s player wins!",
data/3dchess-0.8.1/src/main.c:338:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf( moveString, "%s %c%c%c to %c%c%c%s",
data/3dchess-0.8.1/src/xif.c:419:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
  sprintf(err, pszLeader, ERRORS[n3DcErr].pszErrStr);
data/3dchess-0.8.1/include/3Dc.h:86:21:  [3] (random) random:
  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.
#define RANDDIR() ((random()%3)-1)
data/3dchess-0.8.1/include/machine.h:45:9:  [3] (random) random:
  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.
#define random() rand()
data/3dchess-0.8.1/include/machine.h:46:9:  [3] (random) srandom:
  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.
#define srandom(a) srand(a)
data/3dchess-0.8.1/include/machine.h:46:20:  [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.
#define srandom(a) srand(a)
data/3dchess-0.8.1/src/ai.c:165:17:  [3] (random) random:
  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.
      randNum = random()%randBase;
data/3dchess-0.8.1/src/ai.c:174:18:  [3] (random) random:
  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.
      randMove = random()%bestMoves.stacks[randStack]->nSize;
data/3dchess-0.8.1/src/init.c:140:3:  [3] (random) srandom:
  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.
  srandom((unsigned)time(NULL));
data/3dchess-0.8.1/src/main.c:298: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 winString[19];
data/3dchess-0.8.1/src/stack.c:69:3:  [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(newEl->mvt, newMove, sizeof(Move));
data/3dchess-0.8.1/src/xif.c:242: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(boardName, "3Dc board ?");
data/3dchess-0.8.1/src/xif.c:481: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 cnt[2] = {' ', '0'};
data/3dchess-0.8.1/src/main.c:203:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
    usleep(10);
data/3dchess-0.8.1/src/xif.c:415: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).
  err = (char *)malloc(strlen(pszLeader) + 40);

ANALYSIS SUMMARY:

Hits = 16
Lines analyzed = 4452 in approximately 0.10 seconds (43602 lines/second)
Physical Source Lines of Code (SLOC) = 3035
Hits@level = [0]  14 [1]   2 [2]   4 [3]   7 [4]   3 [5]   0
Hits@level+ = [0+]  30 [1+]  16 [2+]  14 [3+]  10 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 9.88468 [1+] 5.27183 [2+] 4.61285 [3+] 3.29489 [4+] 0.988468 [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.