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/xtail-2.1/acconfig.h
Examining data/xtail-2.1/entryfuncs.c
Examining data/xtail-2.1/xtail.h
Examining data/xtail-2.1/xtail.c
Examining data/xtail-2.1/miscfuncs.c

FINAL RESULTS:

data/xtail-2.1/miscfuncs.c:47:15:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
 extern char *strcpy(), *strrchr();
data/xtail-2.1/miscfuncs.c:74:19:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    (void) strcat(strcpy(pathname, dirname), "/");
data/xtail-2.1/miscfuncs.c:84:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	(void) strcpy(basename, dp->d_name);
data/xtail-2.1/miscfuncs.c:207:9:  [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.
	(void) printf(mssg_list[sel], e->name, strerror(errno));
data/xtail-2.1/miscfuncs.c:311:9:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	return strcpy(safe_malloc(strlen(p)+1), p);
data/xtail-2.1/xtail.h:51:45:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define Dprintf if ( !Debug ) ; else (void) fprintf
data/xtail-2.1/entryfuncs.c:170:23:  [2] (misc) open:
  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 ((entryp->fd = open(entryp->name, O_RDONLY)) > 0)
data/xtail-2.1/miscfuncs.c:68:12:  [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.
    static char pathname[MAXNAMLEN];
data/xtail-2.1/miscfuncs.c:264: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.
	static char buf[8];
data/xtail-2.1/miscfuncs.c:271:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(buf, "?err?");
data/xtail-2.1/miscfuncs.c:280: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(buf, "ctrl-%c", c+0x40);
data/xtail-2.1/miscfuncs.c:282: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(buf, "0x%02X", c);
data/xtail-2.1/xtail.c:253:14:  [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.
    		static char buf[BUFSIZ];
data/xtail-2.1/miscfuncs.c:30: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).
# define NAMLEN(dirent) strlen((dirent)->d_name)
data/xtail-2.1/miscfuncs.c:74:12:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
    (void) strcat(strcpy(pathname, dirname), "/");
data/xtail-2.1/miscfuncs.c:75:27:  [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).
    basename = pathname + strlen(pathname);
data/xtail-2.1/miscfuncs.c:311: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).
	return strcpy(safe_malloc(strlen(p)+1), p);
data/xtail-2.1/xtail.c:255:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((nb = read(entryp->fd, buf, sizeof(buf))) > 0) {

ANALYSIS SUMMARY:

Hits = 18
Lines analyzed = 1137 in approximately 0.04 seconds (29428 lines/second)
Physical Source Lines of Code (SLOC) = 693
Hits@level = [0]   7 [1]   5 [2]   7 [3]   0 [4]   6 [5]   0
Hits@level+ = [0+]  25 [1+]  18 [2+]  13 [3+]   6 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 36.075 [1+] 25.974 [2+] 18.759 [3+] 8.65801 [4+] 8.65801 [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.