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/gumbo-parser-0.10.1+dfsg/benchmarks/benchmark.cc
Examining data/gumbo-parser-0.10.1+dfsg/examples/clean_text.cc
Examining data/gumbo-parser-0.10.1+dfsg/examples/find_links.cc
Examining data/gumbo-parser-0.10.1+dfsg/examples/get_title.c
Examining data/gumbo-parser-0.10.1+dfsg/examples/positions_of_class.cc
Examining data/gumbo-parser-0.10.1+dfsg/examples/prettyprint.cc
Examining data/gumbo-parser-0.10.1+dfsg/examples/serialize.cc
Examining data/gumbo-parser-0.10.1+dfsg/src/attribute.c
Examining data/gumbo-parser-0.10.1+dfsg/src/attribute.h
Examining data/gumbo-parser-0.10.1+dfsg/src/char_ref.c
Examining data/gumbo-parser-0.10.1+dfsg/src/char_ref.h
Examining data/gumbo-parser-0.10.1+dfsg/src/error.c
Examining data/gumbo-parser-0.10.1+dfsg/src/error.h
Examining data/gumbo-parser-0.10.1+dfsg/src/gumbo.h
Examining data/gumbo-parser-0.10.1+dfsg/src/insertion_mode.h
Examining data/gumbo-parser-0.10.1+dfsg/src/parser.c
Examining data/gumbo-parser-0.10.1+dfsg/src/parser.h
Examining data/gumbo-parser-0.10.1+dfsg/src/string_buffer.c
Examining data/gumbo-parser-0.10.1+dfsg/src/string_buffer.h
Examining data/gumbo-parser-0.10.1+dfsg/src/string_piece.c
Examining data/gumbo-parser-0.10.1+dfsg/src/string_piece.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tag.c
Examining data/gumbo-parser-0.10.1+dfsg/src/tag_enum.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tag_gperf.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tag_sizes.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tag_strings.h
Examining data/gumbo-parser-0.10.1+dfsg/src/token_type.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tokenizer.c
Examining data/gumbo-parser-0.10.1+dfsg/src/tokenizer.h
Examining data/gumbo-parser-0.10.1+dfsg/src/tokenizer_states.h
Examining data/gumbo-parser-0.10.1+dfsg/src/utf8.c
Examining data/gumbo-parser-0.10.1+dfsg/src/utf8.h
Examining data/gumbo-parser-0.10.1+dfsg/src/util.c
Examining data/gumbo-parser-0.10.1+dfsg/src/util.h
Examining data/gumbo-parser-0.10.1+dfsg/src/vector.c
Examining data/gumbo-parser-0.10.1+dfsg/src/vector.h
Examining data/gumbo-parser-0.10.1+dfsg/tests/attribute.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/char_ref.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/parser.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/string_buffer.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/string_piece.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/test_utils.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/test_utils.h
Examining data/gumbo-parser-0.10.1+dfsg/tests/tokenizer.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/utf8.cc
Examining data/gumbo-parser-0.10.1+dfsg/tests/vector.cc
Examining data/gumbo-parser-0.10.1+dfsg/visualc/include/strings.h

FINAL RESULTS:

data/gumbo-parser-0.10.1+dfsg/src/error.c:38:23:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
  int bytes_written = vsnprintf(
data/gumbo-parser-0.10.1+dfsg/src/error.c:50:18:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    int result = vsnprintf(
data/gumbo-parser-0.10.1+dfsg/src/error.c:67:21:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    bytes_written = vsnprintf(
data/gumbo-parser-0.10.1+dfsg/src/util.c:44:3:  [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(buffer, str);
data/gumbo-parser-0.10.1+dfsg/src/util.c:54:3:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vprintf(format, args);
data/gumbo-parser-0.10.1+dfsg/examples/get_title.c:78:14:  [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* fp = fopen(filename, "r");
data/gumbo-parser-0.10.1+dfsg/src/parser.c:42: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.
typedef char gumbo_tagset[GUMBO_TAG_LAST];
data/gumbo-parser-0.10.1+dfsg/src/string_buffer.c:42: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(new_data, buffer->data, buffer->length);
data/gumbo-parser-0.10.1+dfsg/src/string_buffer.c:90:3:  [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(output->data + output->length, str->data, str->length);
data/gumbo-parser-0.10.1+dfsg/src/string_buffer.c:97:3:  [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, input->data, input->length);
data/gumbo-parser-0.10.1+dfsg/src/string_piece.c:46:3:  [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, source->data, source->length);
data/gumbo-parser-0.10.1+dfsg/src/vector.c:57:7:  [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(temp, vector->data, old_num_bytes);
data/gumbo-parser-0.10.1+dfsg/tests/string_buffer.cc:45:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(buffer_.data, "01234567890123456789");
data/gumbo-parser-0.10.1+dfsg/tests/string_buffer.cc:93:3:  [2] (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). Risk is low because the source is a constant string.
  strcpy(buffer_.data, "012345");
data/gumbo-parser-0.10.1+dfsg/benchmarks/benchmark.cc:59:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/examples/clean_text.cc:64:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/examples/find_links.cc:60:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/examples/positions_of_class.cc:82:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/examples/prettyprint.cc:346:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/examples/serialize.cc:279:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  in.read(&contents[0], contents.size());
data/gumbo-parser-0.10.1+dfsg/src/parser.c:2848: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).
      int prompt_attr_length = strlen(prompt_attr->value);
data/gumbo-parser-0.10.1+dfsg/src/parser.c:4068: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).
      &kGumboDefaultOptions, buffer, strlen(buffer));
data/gumbo-parser-0.10.1+dfsg/src/tag.c:94: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).
  return gumbo_tagn_enum(tagname, strlen(tagname));
data/gumbo-parser-0.10.1+dfsg/src/tokenizer.c:380: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).
  int text_len = strlen(text);
data/gumbo-parser-0.10.1+dfsg/src/tokenizer.c:792:9:  [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(attr->name) == tag_state->_buffer.length &&
data/gumbo-parser-0.10.1+dfsg/src/util.c:43:48:  [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).
  char* buffer = gumbo_parser_allocate(parser, strlen(str) + 1);
data/gumbo-parser-0.10.1+dfsg/tests/char_ref.cc:43:40:  [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).
    utf8iterator_init(&parser_, input, strlen(input), &iter_);
data/gumbo-parser-0.10.1+dfsg/tests/parser.cc:45: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).
    output_ = gumbo_parse_with_options(&options_, input, strlen(input));
data/gumbo-parser-0.10.1+dfsg/tests/parser.cc:60: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).
    output_ = gumbo_parse_with_options(&options_, input, strlen(input));
data/gumbo-parser-0.10.1+dfsg/tests/tokenizer.cc:41:49:  [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).
    gumbo_tokenizer_state_init(&parser_, input, strlen(input));
data/gumbo-parser-0.10.1+dfsg/tests/utf8.cc:40:39:  [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).
    utf8iterator_init(&parser_, text, strlen(text), &input_);

ANALYSIS SUMMARY:

Hits = 31
Lines analyzed = 38465 in approximately 2.27 seconds (16919 lines/second)
Physical Source Lines of Code (SLOC) = 34315
Hits@level = [0]   7 [1]  17 [2]   9 [3]   0 [4]   5 [5]   0
Hits@level+ = [0+]  38 [1+]  31 [2+]  14 [3+]   5 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 1.10739 [1+] 0.903395 [2+] 0.407985 [3+] 0.145709 [4+] 0.145709 [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.