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/utfout-0.0.1/src/utfout.c

FINAL RESULTS:

data/utfout-0.0.1/src/utfout.c:185:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    ret = vsnprintf (p, len-ret, fmt, ap);
data/utfout-0.0.1/src/utfout.c:1271:22:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((option = getopt_long (argc, argv,
data/utfout-0.0.1/src/utfout.c:1410:9:  [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 (seed);
data/utfout-0.0.1/src/utfout.c:164: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     buffer[1024];
data/utfout-0.0.1/src/utfout.c:165:5:  [2] (buffer) wchar_t:
  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.
    wchar_t  wbuffer[1024];
data/utfout-0.0.1/src/utfout.c:268: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    buffer[8]; \
data/utfout-0.0.1/src/utfout.c:391:12:  [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).
    return open (_PATH_TTY, O_RDWR);
data/utfout-0.0.1/src/utfout.c:508:25:  [2] (buffer) wchar_t:
  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.
                        wchar_t  buffer[3+1];
data/utfout-0.0.1/src/utfout.c:550:25:  [2] (buffer) wchar_t:
  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.
                        wchar_t  buffer[8+1];
data/utfout-0.0.1/src/utfout.c:584:25:  [2] (buffer) wchar_t:
  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.
                        wchar_t  buffer[2+1];
data/utfout-0.0.1/src/utfout.c:741:12:  [2] (integer) atol:
  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).
    secs = atol (str);
data/utfout-0.0.1/src/utfout.c:938:5:  [2] (buffer) wchar_t:
  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.
    wchar_t  buffer[WCHAR_BUFSIZE];
data/utfout-0.0.1/src/utfout.c:1340:26:  [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).
                repeat = atoi (optarg);
data/utfout-0.0.1/src/utfout.c:1366:27:  [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).
                last_fd = atoi (optarg);
data/utfout-0.0.1/src/utfout.c:1377:23:  [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).
                exit (atoi (optarg));
data/utfout-0.0.1/src/utfout.c:740: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).
    len = strlen (str);
data/utfout-0.0.1/src/utfout.c:954:10:  [1] (buffer) wcslen:
  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 ((wcslen (range) >= 24
data/utfout-0.0.1/src/utfout.c:1009:29:  [1] (buffer) wcslen:
  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).
                } else if ((wcslen (range) >= 16
data/utfout-0.0.1/src/utfout.c:1049:29:  [1] (buffer) wcslen:
  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).
                } else if ((wcslen (range) >= 14
data/utfout-0.0.1/src/utfout.c:1085:29:  [1] (buffer) wcslen:
  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).
                } else if ((wcslen (range) >= 12
data/utfout-0.0.1/src/utfout.c:1117:29:  [1] (buffer) wcslen:
  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).
                } else if ((wcslen (range) >= 6

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 1428 in approximately 0.05 seconds (31366 lines/second)
Physical Source Lines of Code (SLOC) = 888
Hits@level = [0]  16 [1]   6 [2]  12 [3]   2 [4]   1 [5]   0
Hits@level+ = [0+]  37 [1+]  21 [2+]  15 [3+]   3 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 41.6667 [1+] 23.6486 [2+] 16.8919 [3+] 3.37838 [4+] 1.12613 [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.