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/libcroco-0.6.13/docs/examples/sac-example-2.c Examining data/libcroco-0.6.13/docs/examples/sac-example-1.c Examining data/libcroco-0.6.13/docs/examples/cssom-example-1.c Examining data/libcroco-0.6.13/csslint/csslint.c Examining data/libcroco-0.6.13/tests/test4-main.c Examining data/libcroco-0.6.13/tests/test1-main.c Examining data/libcroco-0.6.13/tests/test3-main.c Examining data/libcroco-0.6.13/tests/cr-test-utils.h Examining data/libcroco-0.6.13/tests/test6-main.c Examining data/libcroco-0.6.13/tests/cr-test-utils.c Examining data/libcroco-0.6.13/tests/test0-main.c Examining data/libcroco-0.6.13/tests/test2-main.c Examining data/libcroco-0.6.13/tests/test5-main.c Examining data/libcroco-0.6.13/src/cr-selector.h Examining data/libcroco-0.6.13/src/cr-tknzr.c Examining data/libcroco-0.6.13/src/libcroco.h Examining data/libcroco-0.6.13/src/cr-term.h Examining data/libcroco-0.6.13/src/cr-enc-handler.h Examining data/libcroco-0.6.13/src/cr-parsing-location.h Examining data/libcroco-0.6.13/src/cr-pseudo.h Examining data/libcroco-0.6.13/src/cr-fonts.c Examining data/libcroco-0.6.13/src/cr-doc-handler.h Examining data/libcroco-0.6.13/src/cr-cascade.h Examining data/libcroco-0.6.13/src/cr-input.h Examining data/libcroco-0.6.13/src/cr-rgb.c Examining data/libcroco-0.6.13/src/cr-statement.h Examining data/libcroco-0.6.13/src/cr-simple-sel.c Examining data/libcroco-0.6.13/src/cr-additional-sel.c Examining data/libcroco-0.6.13/src/cr-statement.c Examining data/libcroco-0.6.13/src/cr-simple-sel.h Examining data/libcroco-0.6.13/src/cr-fonts.h Examining data/libcroco-0.6.13/src/cr-stylesheet.h Examining data/libcroco-0.6.13/src/cr-num.c Examining data/libcroco-0.6.13/src/cr-style.c Examining data/libcroco-0.6.13/src/cr-token.h Examining data/libcroco-0.6.13/src/cr-term.c Examining data/libcroco-0.6.13/src/cr-selector.c Examining data/libcroco-0.6.13/src/cr-string.h Examining data/libcroco-0.6.13/src/cr-string.c Examining data/libcroco-0.6.13/src/cr-parsing-location.c Examining data/libcroco-0.6.13/src/cr-prop-list.h Examining data/libcroco-0.6.13/src/cr-input.c Examining data/libcroco-0.6.13/src/cr-utils.h Examining data/libcroco-0.6.13/src/cr-sel-eng.c Examining data/libcroco-0.6.13/src/cr-utils.c Examining data/libcroco-0.6.13/src/cr-attr-sel.c Examining data/libcroco-0.6.13/src/cr-stylesheet.c Examining data/libcroco-0.6.13/src/cr-om-parser.h Examining data/libcroco-0.6.13/src/cr-style.h Examining data/libcroco-0.6.13/src/cr-declaration.c Examining data/libcroco-0.6.13/src/cr-cascade.c Examining data/libcroco-0.6.13/src/cr-prop-list.c Examining data/libcroco-0.6.13/src/cr-sel-eng.h Examining data/libcroco-0.6.13/src/cr-enc-handler.c Examining data/libcroco-0.6.13/src/cr-num.h Examining data/libcroco-0.6.13/src/cr-parser.h Examining data/libcroco-0.6.13/src/cr-additional-sel.h Examining data/libcroco-0.6.13/src/cr-doc-handler.c Examining data/libcroco-0.6.13/src/cr-declaration.h Examining data/libcroco-0.6.13/src/cr-parser.c Examining data/libcroco-0.6.13/src/libcroco-config.h Examining data/libcroco-0.6.13/src/cr-rgb.h Examining data/libcroco-0.6.13/src/cr-pseudo.c Examining data/libcroco-0.6.13/src/cr-tknzr.h Examining data/libcroco-0.6.13/src/cr-om-parser.c Examining data/libcroco-0.6.13/src/cr-token.c Examining data/libcroco-0.6.13/src/cr-attr-sel.h FINAL RESULTS: data/libcroco-0.6.13/src/cr-fonts.c:395: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 (a_dst, a_src, sizeof (CRFontSize)); data/libcroco-0.6.13/src/cr-input.c:210:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). file_ptr = fopen (a_file_uri, "r"); data/libcroco-0.6.13/src/cr-input.c:244: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 (buf + len, tmp_buf, nb_read); data/libcroco-0.6.13/src/cr-num.c:222: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 (a_dest, a_src, sizeof (CRNum)); data/libcroco-0.6.13/src/cr-parsing-location.c:89: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 (a_to, a_from, sizeof (CRParsingLocation)) ; data/libcroco-0.6.13/src/cr-rgb.c:620: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 (a_dest, a_src, sizeof (CRRgb)) ; data/libcroco-0.6.13/src/cr-style.c:2316: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 (a_dest, a_src, sizeof (CRStyle)); data/libcroco-0.6.13/src/cr-declaration.c:133:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_str, strlen ((const char *) a_str), a_enc, FALSE); data/libcroco-0.6.13/src/cr-declaration.c:197:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_str, strlen ((const char *) a_str), a_enc, FALSE); data/libcroco-0.6.13/src/cr-rgb.c:509:13: [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 (strlen ((const char *) a_hex) == 3) { data/libcroco-0.6.13/src/cr-rgb.c:524: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). } else if (strlen ((const char *) a_hex) == 6) { data/libcroco-0.6.13/src/cr-rgb.c:658:53: [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). parser = cr_parser_new_from_buf ((guchar *) a_str, strlen ((const char *) a_str), a_enc, FALSE); data/libcroco-0.6.13/src/cr-sel-eng.c:110:4: [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 (str) != (lit_len) || memcmp (str, lit, lit_len)) data/libcroco-0.6.13/src/cr-selector.c:60:63: [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). parser = cr_parser_new_from_buf ((guchar*)a_char_buf, strlen ((const char *) a_char_buf), data/libcroco-0.6.13/src/cr-statement.c:938:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1058:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1195:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1381:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1508:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1624:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-statement.c:1721:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/src/cr-style.c:851: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). strlen (disp_vals_map[i].prop_name))) { data/libcroco-0.6.13/src/cr-style.c:901:47: [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 (position_vals_map[i]. data/libcroco-0.6.13/src/cr-term.c:115:58: [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). parser = cr_parser_new_from_buf ((guchar*)a_buf, strlen ((const char *) a_buf), data/libcroco-0.6.13/tests/test5-main.c:163:63: [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). xml_doc = xmlParseMemory ((const char *) xml_content, strlen ((const char *) xml_content)); data/libcroco-0.6.13/tests/test6-main.c:57:42: [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 ((const char *) gv_cssbuf), ANALYSIS SUMMARY: Hits = 26 Lines analyzed = 33576 in approximately 0.92 seconds (36543 lines/second) Physical Source Lines of Code (SLOC) = 20906 Hits@level = [0] 207 [1] 19 [2] 7 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 233 [1+] 26 [2+] 7 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 11.1451 [1+] 1.24366 [2+] 0.334832 [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.