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/py-ubjson-0.14.0/src/_ubjson.c
Examining data/py-ubjson-0.14.0/src/encoder.h
Examining data/py-ubjson-0.14.0/src/python_funcs.c
Examining data/py-ubjson-0.14.0/src/decoder.h
Examining data/py-ubjson-0.14.0/src/encoder.c
Examining data/py-ubjson-0.14.0/src/markers.h
Examining data/py-ubjson-0.14.0/src/common.h
Examining data/py-ubjson-0.14.0/src/python_funcs.h
Examining data/py-ubjson-0.14.0/src/decoder.c

FINAL RESULTS:

data/py-ubjson-0.14.0/src/decoder.c:260:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            return memcpy(dst_buffer, &((char*)buffer->view.buf)[old_pos], *len);
data/py-ubjson-0.14.0/src/decoder.c:301:16:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
        return memcpy(dst_buffer, buffer->view.buf, *len);
data/py-ubjson-0.14.0/src/decoder.c:344:17:  [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(tmp_dst, &((char*)buffer->view.buf)[buffer->pos], remaining_old);
data/py-ubjson-0.14.0/src/decoder.c:371: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(&tmp_dst[remaining_old], (char*)buffer->view.buf, buffer->pos);
data/py-ubjson-0.14.0/src/decoder.c:381:20:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
            return memcpy(dst_buffer, &((char*)buffer->view.buf)[old_pos], *len);
data/py-ubjson-0.14.0/src/encoder.c:143: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(&(buffer->raw[buffer->pos]), chunk, sizeof(char) * chunk_len);
data/py-ubjson-0.14.0/src/encoder.c:153: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(&(buffer->raw[buffer->pos]), chunk, sizeof(char) * chunk_len);
data/py-ubjson-0.14.0/src/encoder.c:321: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 numtmp[9]; // holds type char + float32/64
data/py-ubjson-0.14.0/src/encoder.c:410: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 numtmp[9]; // large enough to hold type + maximum integer (INT64)
data/py-ubjson-0.14.0/src/python_funcs.c:375: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 buf[4];
data/py-ubjson-0.14.0/src/python_funcs.c:382: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(&x, buf, 4);
data/py-ubjson-0.14.0/src/python_funcs.c:385: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(&x, p, 4);
data/py-ubjson-0.14.0/src/python_funcs.c:470: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 buf[8];
data/py-ubjson-0.14.0/src/python_funcs.c:477: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(&x, buf, 8);
data/py-ubjson-0.14.0/src/python_funcs.c:480: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(&x, p, 8);
data/py-ubjson-0.14.0/src/decoder.c:54:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read > 0) {\
data/py-ubjson-0.14.0/src/decoder.c:56:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        } else if ((len > 0) || (read < len)) {\
data/py-ubjson-0.14.0/src/decoder.c:59:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    } else if (read < len) {\
data/py-ubjson-0.14.0/src/decoder.c:69:46:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ACTION_READ_ERROR(READ_VIA_FUNC(buffer, &read, dst_buffer), len, item_str);\
data/py-ubjson-0.14.0/src/decoder.c:74:60:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ACTION_READ_ERROR((dst_buffer = READ_VIA_FUNC(buffer, &read, NULL)), len, item_str);\
data/py-ubjson-0.14.0/src/decoder.c:79:65:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ACTION_READ_ERROR((dst_buffer = cast READ_VIA_FUNC(buffer, &read, NULL)), len, item_str);\

ANALYSIS SUMMARY:

Hits = 21
Lines analyzed = 2782 in approximately 0.08 seconds (36296 lines/second)
Physical Source Lines of Code (SLOC) = 1992
Hits@level = [0]   0 [1]   6 [2]  15 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  21 [1+]  21 [2+]  15 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 10.5422 [1+] 10.5422 [2+] 7.53012 [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.