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/xchain-1.0.1/xchain.c

FINAL RESULTS:

data/xchain-1.0.1/xchain.c:34:13:  [4] (format) wprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static void wprintf(char *, ...) __attribute__((format (printf, 1, 2)));
data/xchain-1.0.1/xchain.c:34:57:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
static void wprintf(char *, ...) __attribute__((format (printf, 1, 2)));
data/xchain-1.0.1/xchain.c:348:5:  [4] (shell) execl:
  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.
    execl(wish,"wish",NULL);
data/xchain-1.0.1/xchain.c:463:6:  [4] (format) wprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void wprintf(char *fmt, ...) {
data/xchain-1.0.1/xchain.c:468:3:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
  vsprintf(buff, fmt, argp);
data/xchain-1.0.1/xchain.c:323: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/xchain-1.0.1/xchain.c:48: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 name[5][34];
data/xchain-1.0.1/xchain.c:111: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 in_buf[5];
data/xchain-1.0.1/xchain.c:133:14:  [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).
  num_cols = atoi(in_buf);
data/xchain-1.0.1/xchain.c:140:14:  [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).
  num_rand = atoi(in_buf);
data/xchain-1.0.1/xchain.c:295: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 inbuf[6];
data/xchain-1.0.1/xchain.c:465: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 buff[4096];
data/xchain-1.0.1/xchain.c:124:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(pipe_in[0],name[i],32);
data/xchain-1.0.1/xchain.c:131:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read(pipe_in[0],in_buf,sizeof(in_buf));
data/xchain-1.0.1/xchain.c:138:3:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  read(pipe_in[0],in_buf,sizeof(in_buf));
data/xchain-1.0.1/xchain.c:359:5:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    read(pipe_in[0],inbuf,5);
data/xchain-1.0.1/xchain.c:469: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).
  write(pipe_out[1],buff,strlen(buff));

ANALYSIS SUMMARY:

Hits = 17
Lines analyzed = 479 in approximately 0.04 seconds (12325 lines/second)
Physical Source Lines of Code (SLOC) = 401
Hits@level = [0]  90 [1]   5 [2]   6 [3]   1 [4]   5 [5]   0
Hits@level+ = [0+] 107 [1+]  17 [2+]  12 [3+]   6 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 266.833 [1+] 42.394 [2+] 29.9252 [3+] 14.9626 [4+] 12.4688 [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.