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/pysmbc-1.0.23/smbc/file.h
Examining data/pysmbc-1.0.23/smbc/context.c
Examining data/pysmbc-1.0.23/smbc/dir.c
Examining data/pysmbc-1.0.23/smbc/context.h
Examining data/pysmbc-1.0.23/smbc/smbcdirent.c
Examining data/pysmbc-1.0.23/smbc/file.c
Examining data/pysmbc-1.0.23/smbc/smbcmodule.h
Examining data/pysmbc-1.0.23/smbc/dir.h
Examining data/pysmbc-1.0.23/smbc/smbcmodule.c
Examining data/pysmbc-1.0.23/smbc/smbcdirent.h

FINAL RESULTS:

data/pysmbc-1.0.23/smbc/smbcmodule.c:239:5:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
    vfprintf (stderr, fmt, ap);
data/pysmbc-1.0.23/smbc/smbcmodule.c:227:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if (!getenv (ENVAR))
data/pysmbc-1.0.23/smbc/dir.c:127:13:  [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 dirbuf[1024];
data/pysmbc-1.0.23/smbc/file.c:285: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[2048];
data/pysmbc-1.0.23/smbc/smbcdirent.c:116: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 s[1024];
data/pysmbc-1.0.23/smbc/context.c:86:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (workgroup, use_workgroup, wgmaxlen - 1);
data/pysmbc-1.0.23/smbc/context.c:88:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (username, use_username, unmaxlen - 1);
data/pysmbc-1.0.23/smbc/context.c:90:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy (password, use_password, pwmaxlen - 1);
data/pysmbc-1.0.23/smbc/context.c:710:48:  [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).
  ret = (*fn)(self->context, uri, name, value, strlen (value), flags);
data/pysmbc-1.0.23/smbc/smbcdirent.c:122:40:  [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 PyBytes_FromStringAndSize (s, strlen (s));

ANALYSIS SUMMARY:

Hits = 10
Lines analyzed = 2914 in approximately 0.10 seconds (29608 lines/second)
Physical Source Lines of Code (SLOC) = 2283
Hits@level = [0]   1 [1]   5 [2]   3 [3]   1 [4]   1 [5]   0
Hits@level+ = [0+]  11 [1+]  10 [2+]   5 [3+]   2 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 4.81822 [1+] 4.3802 [2+] 2.1901 [3+] 0.87604 [4+] 0.43802 [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.