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/libnxt-0.3/main_fwflash.c
Examining data/libnxt-0.3/lowlevel.h
Examining data/libnxt-0.3/error.h
Examining data/libnxt-0.3/flash.h
Examining data/libnxt-0.3/main_fwexec.c
Examining data/libnxt-0.3/firmware.c
Examining data/libnxt-0.3/firmware.h
Examining data/libnxt-0.3/samba.c
Examining data/libnxt-0.3/flash_write/flash.c
Examining data/libnxt-0.3/samba.h
Examining data/libnxt-0.3/lowlevel.c
Examining data/libnxt-0.3/error.c
Examining data/libnxt-0.3/flash.c

FINAL RESULTS:

data/libnxt-0.3/firmware.c:97:8:  [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).
  fd = open(fw_path, O_RDONLY);
data/libnxt-0.3/firmware.c:113:8:  [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).
  fd = open(fw_path, O_RDONLY);
data/libnxt-0.3/firmware.c:128:7:  [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[256];
data/libnxt-0.3/lowlevel.c:94: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 buf[2];
data/libnxt-0.3/main_fwexec.c:50:7:  [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).
  f = fopen(filename, "rb");
data/libnxt-0.3/samba.c:49: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 buf[21] = {0};
data/libnxt-0.3/samba.c:83: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 buf[20] = {0};
data/libnxt-0.3/samba.c:139: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 buf[20];
data/libnxt-0.3/samba.c:152: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 buf[20];
data/libnxt-0.3/samba.c:164: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 buf[20];
data/libnxt-0.3/samba.c:176: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 buf[3];
data/libnxt-0.3/samba.c:177: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, "V#");
data/libnxt-0.3/firmware.c:132:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      ret = read(fd, buf, 256);
data/libnxt-0.3/lowlevel.c:159:33:  [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 nxt_send_buf(nxt, str, strlen(str));

ANALYSIS SUMMARY:

Hits = 14
Lines analyzed = 1139 in approximately 0.05 seconds (22123 lines/second)
Physical Source Lines of Code (SLOC) = 647
Hits@level = [0]  22 [1]   2 [2]  12 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  36 [1+]  14 [2+]  12 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 55.6414 [1+] 21.6383 [2+] 18.5471 [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.