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/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c
Examining data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.h
Examining data/ruamel.yaml.clib-0.2.2/api.c
Examining data/ruamel.yaml.clib-0.2.2/config.h
Examining data/ruamel.yaml.clib-0.2.2/dumper.c
Examining data/ruamel.yaml.clib-0.2.2/emitter.c
Examining data/ruamel.yaml.clib-0.2.2/loader.c
Examining data/ruamel.yaml.clib-0.2.2/parser.c
Examining data/ruamel.yaml.clib-0.2.2/reader.c
Examining data/ruamel.yaml.clib-0.2.2/scanner.c
Examining data/ruamel.yaml.clib-0.2.2/writer.c
Examining data/ruamel.yaml.clib-0.2.2/yaml.h
Examining data/ruamel.yaml.clib-0.2.2/yaml_private.h

FINAL RESULTS:

data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:770:5:  [4] (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).
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
data/ruamel.yaml.clib-0.2.2/dumper.c:254:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf((char *)anchor, ANCHOR_TEMPLATE, anchor_id);
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:27557:18:  [3] (random) setstate:
  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.
            if (!setstate) PyErr_Clear();
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:27558:18:  [3] (random) setstate:
  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.
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:27558:58:  [3] (random) setstate:
  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.
            if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:27579:16:  [3] (random) setstate:
  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.
    Py_XDECREF(setstate);
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:723:9:  [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 ascii_chars[128];
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:14548: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(__pyx_v_buffer, (PyString_AS_STRING(__pyx_t_1) + __pyx_v_parser->stream_cache_pos), __pyx_v_size);
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:28562: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 ctversion[4], rtversion[4];
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:28566:9:  [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 message[200];
data/ruamel.yaml.clib-0.2.2/api.c:108: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(*a_pointer, *b_start, *b_pointer - *b_start);
data/ruamel.yaml.clib-0.2.2/api.c:264: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(buffer, parser->input.string.current, size);
data/ruamel.yaml.clib-0.2.2/api.c:426: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(emitter->output.string.buffer
data/ruamel.yaml.clib-0.2.2/api.c:435: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(emitter->output.string.buffer
data/ruamel.yaml.clib-0.2.2/api.c:854: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(value_copy, value, length);
data/ruamel.yaml.clib-0.2.2/api.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(value_copy, value, length);
data/ruamel.yaml.clib-0.2.2/emitter.c:557: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 version_buf[VERSION_BUF_LEN];
data/ruamel.yaml.clib-0.2.2/emitter.c:613: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(version_buf, "%d.%d", vdp.major, vdp.minor);
data/ruamel.yaml.clib-0.2.2/emitter.c:2193: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 indent_hint[2];
data/ruamel.yaml.clib-0.2.2/parser.c:613:25:  [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(tag, tag_directive->prefix, prefix_len);
data/ruamel.yaml.clib-0.2.2/parser.c:614:25:  [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(tag+prefix_len, tag_suffix, suffix_len);
data/ruamel.yaml.clib-0.2.2/scanner.c:2594: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(string.start, head+1, length-1);
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:647:87:  [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).
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:768:52:  [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).
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.c:28610:65:  [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
data/ruamel.yaml.clib-0.2.2/_ruamel_yaml.h:6: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).
#define PyUnicode_FromString(s) PyUnicode_DecodeUTF8((s), strlen(s), "strict")
data/ruamel.yaml.clib-0.2.2/api.c:741:25:  [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).
                        strlen((char *)tag_directive->handle)))
data/ruamel.yaml.clib-0.2.2/api.c:744:25:  [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).
                        strlen((char *)tag_directive->prefix)))
data/ruamel.yaml.clib-0.2.2/api.c:805:34:  [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 (!yaml_check_utf8(anchor, strlen((char *)anchor))) return 0;
data/ruamel.yaml.clib-0.2.2/api.c:836:38:  [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 (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:842:35:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:848:18:  [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).
        length = strlen((char *)value);
data/ruamel.yaml.clib-0.2.2/api.c:886:38:  [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 (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:892:35:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:941:38:  [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 (!yaml_check_utf8(anchor, strlen((char *)anchor))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:947:35:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:1082:25:  [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).
                        strlen((char *)tag_directive->handle)))
data/ruamel.yaml.clib-0.2.2/api.c:1085:25:  [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).
                        strlen((char *)tag_directive->prefix)))
data/ruamel.yaml.clib-0.2.2/api.c:1219:31:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:1224:18:  [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).
        length = strlen((char *)value);
data/ruamel.yaml.clib-0.2.2/api.c:1271:31:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/api.c:1316:31:  [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 (!yaml_check_utf8(tag, strlen((char *)tag))) goto error;
data/ruamel.yaml.clib-0.2.2/emitter.c:629:29:  [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).
                            strlen((char *)tag_directive->handle)))
data/ruamel.yaml.clib-0.2.2/emitter.c:632:29:  [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).
                            strlen((char *)tag_directive->prefix), 1))
data/ruamel.yaml.clib-0.2.2/emitter.c:1367: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).
    handle_length = strlen((char *)tag_directive.handle);
data/ruamel.yaml.clib-0.2.2/emitter.c:1368: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).
    prefix_length = strlen((char *)tag_directive.prefix);
data/ruamel.yaml.clib-0.2.2/emitter.c:1416: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).
    anchor_length = strlen((char *)anchor);
data/ruamel.yaml.clib-0.2.2/emitter.c:1453:18:  [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).
    tag_length = strlen((char *)tag);
data/ruamel.yaml.clib-0.2.2/emitter.c:1463:32:  [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).
        size_t prefix_length = strlen((char *)tag_directive->prefix);
data/ruamel.yaml.clib-0.2.2/emitter.c:1470:17:  [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).
                strlen((char *)tag_directive->handle);
data/ruamel.yaml.clib-0.2.2/emitter.c:1803:24:  [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).
    indicator_length = strlen(indicator);
data/ruamel.yaml.clib-0.2.2/parser.c:606: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).
                        size_t prefix_len = strlen((char *)tag_directive->prefix);
data/ruamel.yaml.clib-0.2.2/parser.c:607: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).
                        size_t suffix_len = strlen((char *)tag_suffix);
data/ruamel.yaml.clib-0.2.2/scanner.c:2439:61:  [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 (handle[0] == '!' && handle[1] != '\0' && handle[strlen((char *)handle)-1] == '!')
data/ruamel.yaml.clib-0.2.2/scanner.c:2573:28:  [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).
    size_t length = head ? strlen((char *)head) : 0;

ANALYSIS SUMMARY:

Hits = 55
Lines analyzed = 41735 in approximately 0.98 seconds (42516 lines/second)
Physical Source Lines of Code (SLOC) = 23115
Hits@level = [0]   1 [1]  33 [2]  16 [3]   4 [4]   2 [5]   0
Hits@level+ = [0+]  56 [1+]  55 [2+]  22 [3+]   6 [4+]   2 [5+]   0
Hits/KSLOC@level+ = [0+] 2.42267 [1+] 2.37941 [2+] 0.951763 [3+] 0.259572 [4+] 0.0865239 [5+]   0
Dot directories skipped = 2 (--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.