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/root-tail-1.3/config.h
Examining data/root-tail-1.3/root-tail.c

FINAL RESULTS:

data/root-tail-1.3/root-tail.c:1280:13:  [4] (shell) system:
  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.
            system (command);
data/root-tail-1.3/root-tail.c:526:19:  [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 (display_line->line, line->line, line->len);
data/root-tail-1.3/root-tail.c:657:15:  [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 (s + match_end + new_len - old_len,
data/root-tail-1.3/root-tail.c:663:11:  [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 (s + match_start,
data/root-tail-1.3/root-tail.c:692: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 (r + l1, p2, l2);
data/root-tail-1.3/root-tail.c:704: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[1024], *p;
data/root-tail-1.3/root-tail.c:775:19:  [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).
  if ((file->fp = fopen (file->fname, "r")) == NULL)
data/root-tail-1.3/root-tail.c:1350: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).
              reload = atoi (argv[++i]);
data/root-tail-1.3/root-tail.c:1515:11:  [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[512];
data/root-tail-1.3/root-tail.c:647:25:  [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 new_len = strlen (transform_to);
data/root-tail-1.3/root-tail.c:648:31:  [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 old_whole_len = strlen (s);
data/root-tail-1.3/root-tail.c:681: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).
  int l1 = p1 ? strlen (p1) : 0;
data/root-tail-1.3/root-tail.c:682: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).
  int l2 = strlen (p2);
data/root-tail-1.3/root-tail.c:707: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).
  int ofs = logfile->buf ? strlen (logfile->buf) : 0;
data/root-tail-1.3/root-tail.c:718:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
          ch = fgetc (logfile->fp);
data/root-tail-1.3/root-tail.c:920: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 l = strlen (str);
data/root-tail-1.3/root-tail.c:930:29:  [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).
      continuation_length = strlen (continuation);
data/root-tail-1.3/root-tail.c:1070:23:  [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).
      l = line->len = strlen (p);
data/root-tail-1.3/root-tail.c:1084:14:  [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).
  new->len = strlen (str);
data/root-tail-1.3/root-tail.c:1108: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).
  log->last->len = strlen (new);

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 1700 in approximately 0.06 seconds (29788 lines/second)
Physical Source Lines of Code (SLOC) = 1294
Hits@level = [0]  38 [1]  11 [2]   8 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  58 [1+]  20 [2+]   9 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 44.8223 [1+] 15.456 [2+] 6.95518 [3+] 0.772798 [4+] 0.772798 [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.