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/ntpstat-0.0.0.1/ntpstat.c

FINAL RESULTS:

data/ntpstat-0.0.0.1/ntpstat.c:72:5:  [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 payload[PAYLOADSIZE];
data/ntpstat-0.0.0.1/ntpstat.c:73:5:  [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 authenticator[96];
data/ntpstat-0.0.0.1/ntpstat.c:76: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[PAYLOADSIZE];  /* temporary buffer holding payload string */
data/ntpstat-0.0.0.1/ntpstat.c:270:52:  [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).
      printf("   polling server every %d s\n",1 << atoi(dispstr));
data/ntpstat-0.0.0.1/ntpstat.c:194:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      strncpy(buff, ntpmsg.payload, sizeof(buff));
data/ntpstat-0.0.0.1/ntpstat.c:200: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 (dispstr) == 0) || (strlen (dispstr) > 16)) {
data/ntpstat-0.0.0.1/ntpstat.c:200:34:  [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 (dispstr) == 0) || (strlen (dispstr) > 16)) {
data/ntpstat-0.0.0.1/ntpstat.c:220:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buff, ntpmsg.payload, sizeof(buff));
data/ntpstat-0.0.0.1/ntpstat.c:226:12:  [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 (dispstr) == 0) || (strlen (dispstr) > 2)) {
data/ntpstat-0.0.0.1/ntpstat.c:226:39:  [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 (dispstr) == 0) || (strlen (dispstr) > 2)) {
data/ntpstat-0.0.0.1/ntpstat.c:239:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buff, ntpmsg.payload, sizeof(buff));
data/ntpstat-0.0.0.1/ntpstat.c:247:12:  [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 (dispstr) == 0) || (strlen (dispstr) > 10) ||
data/ntpstat-0.0.0.1/ntpstat.c:247:39:  [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 (dispstr) == 0) || (strlen (dispstr) > 10) ||
data/ntpstat-0.0.0.1/ntpstat.c:248:9:  [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).
	      (strlen (delaystr) == 0) || (strlen (delaystr) > 10)) {
data/ntpstat-0.0.0.1/ntpstat.c:248:37:  [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).
	      (strlen (delaystr) == 0) || (strlen (delaystr) > 10)) {
data/ntpstat-0.0.0.1/ntpstat.c:260:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(buff, ntpmsg.payload, sizeof(buff));
data/ntpstat-0.0.0.1/ntpstat.c:266:10:  [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 (dispstr) == 0) || (strlen (dispstr) > 2)) {
data/ntpstat-0.0.0.1/ntpstat.c:266:37:  [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 (dispstr) == 0) || (strlen (dispstr) > 2)) {

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 278 in approximately 0.02 seconds (14281 lines/second)
Physical Source Lines of Code (SLOC) = 181
Hits@level = [0]  23 [1]  14 [2]   4 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  41 [1+]  18 [2+]   4 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 226.519 [1+] 99.4475 [2+] 22.0994 [3+]   0 [4+]   0 [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.