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/python-bitarray-0.8.1/bitarray/_bitarray.c

FINAL RESULTS:

data/python-bitarray-0.8.1/bitarray/_bitarray.c:119: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 buff[256];
data/python-bitarray-0.8.1/bitarray/_bitarray.c:120:13:  [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(buff, "cannot create bitarray of size %lld, "
data/python-bitarray-0.8.1/bitarray/_bitarray.c:399: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 trans[256];
data/python-bitarray-0.8.1/bitarray/_bitarray.c:715:5:  [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(self->ob_item + (Py_SIZE(self) - strlen), str, strlen);
data/python-bitarray-0.8.1/bitarray/_bitarray.c:933:5:  [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(((bitarrayobject *) res)->ob_item, self->ob_item, Py_SIZE(self));
data/python-bitarray-0.8.1/bitarray/_bitarray.c:1199:5:  [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(str + 1, self->ob_item, Py_SIZE(self));
data/python-bitarray-0.8.1/bitarray/_bitarray.c:1230:5:  [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(tt->ob_item, self->ob_item, Py_SIZE(tt));
data/python-bitarray-0.8.1/bitarray/_bitarray.c:1406:9:  [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(self->ob_item + (Py_SIZE(self) - nread),
data/python-bitarray-0.8.1/bitarray/_bitarray.c:1880: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 buff[256];
data/python-bitarray-0.8.1/bitarray/_bitarray.c:1881:13:  [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(buff, "attempt to assign sequence of size %lld "
data/python-bitarray-0.8.1/bitarray/_bitarray.c:2583:9:  [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(((bitarrayobject *) a)->ob_item, np->ob_item, Py_SIZE(np));
data/python-bitarray-0.8.1/bitarray/_bitarray.c:2611:13:  [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(((bitarrayobject *) a)->ob_item, str + 1, strlen - 1);
data/python-bitarray-0.8.1/bitarray/_bitarray.c:663:16:  [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).
    Py_ssize_t strlen, i;
data/python-bitarray-0.8.1/bitarray/_bitarray.c:672:36:  [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).
    if (resize(self, self->nbits + strlen) < 0)
data/python-bitarray-0.8.1/bitarray/_bitarray.c:677:21:  [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).
    for (i = 0; i < strlen; i++) {
data/python-bitarray-0.8.1/bitarray/_bitarray.c:703:16:  [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).
    Py_ssize_t strlen;
data/python-bitarray-0.8.1/bitarray/_bitarray.c:711:41:  [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).
    if (resize(self, self->nbits + BITS(strlen)) < 0)
data/python-bitarray-0.8.1/bitarray/_bitarray.c:715:45:  [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).
    memcpy(self->ob_item + (Py_SIZE(self) - strlen), str, strlen);
data/python-bitarray-0.8.1/bitarray/_bitarray.c:715:59:  [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).
    memcpy(self->ob_item + (Py_SIZE(self) - strlen), str, strlen);
data/python-bitarray-0.8.1/bitarray/_bitarray.c:2590: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).
        Py_ssize_t strlen;

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 3053 in approximately 0.07 seconds (40970 lines/second)
Physical Source Lines of Code (SLOC) = 2404
Hits@level = [0]   1 [1]   8 [2]  12 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  21 [1+]  20 [2+]  12 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 8.73544 [1+] 8.31947 [2+] 4.99168 [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.