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/ruby-psych-3.1.0+really3.1.0/ext/psych/psych.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_emitter.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_emitter.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_parser.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_parser.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_to_ruby.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_to_ruby.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_yaml_tree.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_yaml_tree.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/config.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/dumper.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/loader.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/parser.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/reader.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/scanner.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/writer.c Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/yaml.h Examining data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/yaml_private.h FINAL RESULTS: data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_parser.c:38:2: [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(buf, str, *read); data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:259: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:421: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:430: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:849: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1225: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:2176: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/scanner.c:2592: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/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_parser.c:28:76: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). static int io_reader(void * data, unsigned char *buf, size_t size, size_t *read) data/ruby-psych-3.1.0+really3.1.0/ext/psych/psych_parser.c:38:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). memcpy(buf, str, *read); data/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:736: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:739: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:800: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:831: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:837: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:843: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:881: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:887: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:936: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:942: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1077: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1080: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1214: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1219: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1266: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/api.c:1311: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:620: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:623: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1357: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1358: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1406: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1443: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1453: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1460: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/emitter.c:1793: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/scanner.c:2437: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/ruby-psych-3.1.0+really3.1.0/ext/psych/yaml/scanner.c:2571: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 = 43 Lines analyzed = 14073 in approximately 0.30 seconds (46413 lines/second) Physical Source Lines of Code (SLOC) = 8255 Hits@level = [0] 1 [1] 31 [2] 11 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 44 [1+] 43 [2+] 12 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 5.3301 [1+] 5.20896 [2+] 1.45366 [3+] 0.121139 [4+] 0.121139 [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.