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/litehtml-0.5/containers/cairo/cairo_container.cpp
Examining data/litehtml-0.5/containers/cairo/cairo_container.h
Examining data/litehtml-0.5/containers/cairo/cairo_font.cpp
Examining data/litehtml-0.5/containers/cairo/cairo_font.h
Examining data/litehtml-0.5/containers/gdiplus/gdiplus_container.cpp
Examining data/litehtml-0.5/containers/gdiplus/gdiplus_container.h
Examining data/litehtml-0.5/containers/linux/container_linux.cpp
Examining data/litehtml-0.5/containers/linux/container_linux.h
Examining data/litehtml-0.5/containers/win32/win32_container.cpp
Examining data/litehtml-0.5/containers/win32/win32_container.h
Examining data/litehtml-0.5/include/litehtml.h
Examining data/litehtml-0.5/src/attributes.h
Examining data/litehtml-0.5/src/background.cpp
Examining data/litehtml-0.5/src/background.h
Examining data/litehtml-0.5/src/borders.h
Examining data/litehtml-0.5/src/box.cpp
Examining data/litehtml-0.5/src/box.h
Examining data/litehtml-0.5/src/context.cpp
Examining data/litehtml-0.5/src/context.h
Examining data/litehtml-0.5/src/css_length.cpp
Examining data/litehtml-0.5/src/css_length.h
Examining data/litehtml-0.5/src/css_margins.h
Examining data/litehtml-0.5/src/css_offsets.h
Examining data/litehtml-0.5/src/css_position.h
Examining data/litehtml-0.5/src/css_selector.cpp
Examining data/litehtml-0.5/src/css_selector.h
Examining data/litehtml-0.5/src/document.cpp
Examining data/litehtml-0.5/src/document.h
Examining data/litehtml-0.5/src/el_anchor.cpp
Examining data/litehtml-0.5/src/el_anchor.h
Examining data/litehtml-0.5/src/el_base.cpp
Examining data/litehtml-0.5/src/el_base.h
Examining data/litehtml-0.5/src/el_before_after.cpp
Examining data/litehtml-0.5/src/el_before_after.h
Examining data/litehtml-0.5/src/el_body.cpp
Examining data/litehtml-0.5/src/el_body.h
Examining data/litehtml-0.5/src/el_break.cpp
Examining data/litehtml-0.5/src/el_break.h
Examining data/litehtml-0.5/src/el_cdata.cpp
Examining data/litehtml-0.5/src/el_cdata.h
Examining data/litehtml-0.5/src/el_comment.cpp
Examining data/litehtml-0.5/src/el_comment.h
Examining data/litehtml-0.5/src/el_div.cpp
Examining data/litehtml-0.5/src/el_div.h
Examining data/litehtml-0.5/src/el_font.cpp
Examining data/litehtml-0.5/src/el_font.h
Examining data/litehtml-0.5/src/el_image.cpp
Examining data/litehtml-0.5/src/el_image.h
Examining data/litehtml-0.5/src/el_link.cpp
Examining data/litehtml-0.5/src/el_link.h
Examining data/litehtml-0.5/src/el_para.cpp
Examining data/litehtml-0.5/src/el_para.h
Examining data/litehtml-0.5/src/el_script.cpp
Examining data/litehtml-0.5/src/el_script.h
Examining data/litehtml-0.5/src/el_space.cpp
Examining data/litehtml-0.5/src/el_space.h
Examining data/litehtml-0.5/src/el_style.cpp
Examining data/litehtml-0.5/src/el_style.h
Examining data/litehtml-0.5/src/el_table.cpp
Examining data/litehtml-0.5/src/el_table.h
Examining data/litehtml-0.5/src/el_td.cpp
Examining data/litehtml-0.5/src/el_td.h
Examining data/litehtml-0.5/src/el_text.cpp
Examining data/litehtml-0.5/src/el_text.h
Examining data/litehtml-0.5/src/el_title.cpp
Examining data/litehtml-0.5/src/el_title.h
Examining data/litehtml-0.5/src/el_tr.cpp
Examining data/litehtml-0.5/src/el_tr.h
Examining data/litehtml-0.5/src/element.cpp
Examining data/litehtml-0.5/src/element.h
Examining data/litehtml-0.5/src/gumbo/attribute.c
Examining data/litehtml-0.5/src/gumbo/attribute.h
Examining data/litehtml-0.5/src/gumbo/char_ref.c
Examining data/litehtml-0.5/src/gumbo/char_ref.h
Examining data/litehtml-0.5/src/gumbo/error.c
Examining data/litehtml-0.5/src/gumbo/error.h
Examining data/litehtml-0.5/src/gumbo/gumbo.h
Examining data/litehtml-0.5/src/gumbo/insertion_mode.h
Examining data/litehtml-0.5/src/gumbo/parser.c
Examining data/litehtml-0.5/src/gumbo/parser.h
Examining data/litehtml-0.5/src/gumbo/string_buffer.c
Examining data/litehtml-0.5/src/gumbo/string_buffer.h
Examining data/litehtml-0.5/src/gumbo/string_piece.c
Examining data/litehtml-0.5/src/gumbo/string_piece.h
Examining data/litehtml-0.5/src/gumbo/tag.c
Examining data/litehtml-0.5/src/gumbo/tag_enum.h
Examining data/litehtml-0.5/src/gumbo/tag_gperf.h
Examining data/litehtml-0.5/src/gumbo/tag_sizes.h
Examining data/litehtml-0.5/src/gumbo/tag_strings.h
Examining data/litehtml-0.5/src/gumbo/token_type.h
Examining data/litehtml-0.5/src/gumbo/tokenizer.c
Examining data/litehtml-0.5/src/gumbo/tokenizer.h
Examining data/litehtml-0.5/src/gumbo/tokenizer_states.h
Examining data/litehtml-0.5/src/gumbo/utf8.c
Examining data/litehtml-0.5/src/gumbo/utf8.h
Examining data/litehtml-0.5/src/gumbo/util.c
Examining data/litehtml-0.5/src/gumbo/util.h
Examining data/litehtml-0.5/src/gumbo/vector.c
Examining data/litehtml-0.5/src/gumbo/vector.h
Examining data/litehtml-0.5/src/gumbo/visualc/include/strings.h
Examining data/litehtml-0.5/src/html.cpp
Examining data/litehtml-0.5/src/html.h
Examining data/litehtml-0.5/src/html_tag.cpp
Examining data/litehtml-0.5/src/html_tag.h
Examining data/litehtml-0.5/src/iterators.cpp
Examining data/litehtml-0.5/src/iterators.h
Examining data/litehtml-0.5/src/media_query.cpp
Examining data/litehtml-0.5/src/media_query.h
Examining data/litehtml-0.5/src/os_types.h
Examining data/litehtml-0.5/src/style.cpp
Examining data/litehtml-0.5/src/style.h
Examining data/litehtml-0.5/src/stylesheet.cpp
Examining data/litehtml-0.5/src/stylesheet.h
Examining data/litehtml-0.5/src/table.cpp
Examining data/litehtml-0.5/src/table.h
Examining data/litehtml-0.5/src/types.h
Examining data/litehtml-0.5/src/utf8_strings.cpp
Examining data/litehtml-0.5/src/utf8_strings.h
Examining data/litehtml-0.5/src/web_color.cpp
Examining data/litehtml-0.5/src/web_color.h

FINAL RESULTS:

data/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/containers/cairo/cairo_container.cpp:13:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(&m_img_sync);
data/litehtml-0.5/containers/cairo/cairo_container.cpp:868:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&m_img_sync);
data/litehtml-0.5/containers/cairo/cairo_font.h:91:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(&m_sync);
data/litehtml-0.5/containers/cairo/cairo_font.cpp:367:2:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
	MultiByteToWideChar(CP_UTF8, 0, src, -1, ret, len + 1);
data/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/os_types.h:22:20:  [2] (integer) _wtoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	#define t_atoi				_wtoi
data/litehtml-0.5/src/os_types.h:43:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	#define t_atoi				atoi
data/litehtml-0.5/src/os_types.h:77:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	#define t_atoi				atoi
data/litehtml-0.5/containers/cairo/cairo_font.cpp:365: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 len = (int) strlen(src);
data/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/gumbo/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/litehtml-0.5/src/os_types.h:16:21:  [1] (buffer) wcslen:
  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 t_strlen			wcslen
data/litehtml-0.5/src/os_types.h:37: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).
	#define t_strlen			strlen
data/litehtml-0.5/src/os_types.h:68: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).
	#define t_strlen			strlen

ANALYSIS SUMMARY:

Hits = 28
Lines analyzed = 51054 in approximately 1.62 seconds (31455 lines/second)
Physical Source Lines of Code (SLOC) = 45961
Hits@level = [0]   2 [1]  10 [2]  10 [3]   3 [4]   5 [5]   0
Hits@level+ = [0+]  30 [1+]  28 [2+]  18 [3+]   8 [4+]   5 [5+]   0
Hits/KSLOC@level+ = [0+] 0.652727 [1+] 0.609212 [2+] 0.391636 [3+] 0.174061 [4+] 0.108788 [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.