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/pugixml-1.10/docs/samples/custom_memory_management.cpp
Examining data/pugixml-1.10/docs/samples/include.cpp
Examining data/pugixml-1.10/docs/samples/load_error_handling.cpp
Examining data/pugixml-1.10/docs/samples/load_file.cpp
Examining data/pugixml-1.10/docs/samples/load_memory.cpp
Examining data/pugixml-1.10/docs/samples/load_options.cpp
Examining data/pugixml-1.10/docs/samples/load_stream.cpp
Examining data/pugixml-1.10/docs/samples/modify_add.cpp
Examining data/pugixml-1.10/docs/samples/modify_base.cpp
Examining data/pugixml-1.10/docs/samples/modify_remove.cpp
Examining data/pugixml-1.10/docs/samples/save_custom_writer.cpp
Examining data/pugixml-1.10/docs/samples/save_declaration.cpp
Examining data/pugixml-1.10/docs/samples/save_file.cpp
Examining data/pugixml-1.10/docs/samples/save_options.cpp
Examining data/pugixml-1.10/docs/samples/save_stream.cpp
Examining data/pugixml-1.10/docs/samples/save_subtree.cpp
Examining data/pugixml-1.10/docs/samples/text.cpp
Examining data/pugixml-1.10/docs/samples/traverse_base.cpp
Examining data/pugixml-1.10/docs/samples/traverse_iter.cpp
Examining data/pugixml-1.10/docs/samples/traverse_predicate.cpp
Examining data/pugixml-1.10/docs/samples/traverse_rangefor.cpp
Examining data/pugixml-1.10/docs/samples/traverse_walker.cpp
Examining data/pugixml-1.10/docs/samples/xpath_error.cpp
Examining data/pugixml-1.10/docs/samples/xpath_query.cpp
Examining data/pugixml-1.10/docs/samples/xpath_select.cpp
Examining data/pugixml-1.10/docs/samples/xpath_variables.cpp
Examining data/pugixml-1.10/src/pugiconfig.hpp
Examining data/pugixml-1.10/src/pugixml.cpp
Examining data/pugixml-1.10/src/pugixml.hpp
Examining data/pugixml-1.10/tests/allocator.cpp
Examining data/pugixml-1.10/tests/allocator.hpp
Examining data/pugixml-1.10/tests/fuzz_parse.cpp
Examining data/pugixml-1.10/tests/fuzz_xpath.cpp
Examining data/pugixml-1.10/tests/helpers.hpp
Examining data/pugixml-1.10/tests/main.cpp
Examining data/pugixml-1.10/tests/test.cpp
Examining data/pugixml-1.10/tests/test.hpp
Examining data/pugixml-1.10/tests/test_compact.cpp
Examining data/pugixml-1.10/tests/test_deprecated.cpp
Examining data/pugixml-1.10/tests/test_document.cpp
Examining data/pugixml-1.10/tests/test_dom_modify.cpp
Examining data/pugixml-1.10/tests/test_dom_text.cpp
Examining data/pugixml-1.10/tests/test_dom_traverse.cpp
Examining data/pugixml-1.10/tests/test_header_guard.cpp
Examining data/pugixml-1.10/tests/test_header_iosfwd_1.cpp
Examining data/pugixml-1.10/tests/test_header_iosfwd_2.cpp
Examining data/pugixml-1.10/tests/test_header_iostream_1.cpp
Examining data/pugixml-1.10/tests/test_header_iostream_2.cpp
Examining data/pugixml-1.10/tests/test_header_only_1.cpp
Examining data/pugixml-1.10/tests/test_header_only_2.cpp
Examining data/pugixml-1.10/tests/test_header_string_1.cpp
Examining data/pugixml-1.10/tests/test_header_string_2.cpp
Examining data/pugixml-1.10/tests/test_header_string_iostream.cpp
Examining data/pugixml-1.10/tests/test_memory.cpp
Examining data/pugixml-1.10/tests/test_parse.cpp
Examining data/pugixml-1.10/tests/test_parse_doctype.cpp
Examining data/pugixml-1.10/tests/test_unicode.cpp
Examining data/pugixml-1.10/tests/test_version.cpp
Examining data/pugixml-1.10/tests/test_write.cpp
Examining data/pugixml-1.10/tests/test_xpath.cpp
Examining data/pugixml-1.10/tests/test_xpath_api.cpp
Examining data/pugixml-1.10/tests/test_xpath_functions.cpp
Examining data/pugixml-1.10/tests/test_xpath_operators.cpp
Examining data/pugixml-1.10/tests/test_xpath_parse.cpp
Examining data/pugixml-1.10/tests/test_xpath_paths.cpp
Examining data/pugixml-1.10/tests/test_xpath_paths_abbrev_w3c.cpp
Examining data/pugixml-1.10/tests/test_xpath_paths_w3c.cpp
Examining data/pugixml-1.10/tests/test_xpath_variables.cpp
Examining data/pugixml-1.10/tests/test_xpath_xalan_1.cpp
Examining data/pugixml-1.10/tests/test_xpath_xalan_2.cpp
Examining data/pugixml-1.10/tests/test_xpath_xalan_3.cpp
Examining data/pugixml-1.10/tests/test_xpath_xalan_4.cpp
Examining data/pugixml-1.10/tests/test_xpath_xalan_5.cpp
Examining data/pugixml-1.10/tests/writer_string.cpp
Examining data/pugixml-1.10/tests/writer_string.hpp

FINAL RESULTS:

data/pugixml-1.10/src/pugixml.cpp:141:35:  [4] (format) snprintf:
  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.
#	define PUGI__SNPRINTF(buf, ...) snprintf(buf, sizeof(buf), __VA_ARGS__)
data/pugixml-1.10/src/pugixml.cpp:145:25:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#	define PUGI__SNPRINTF sprintf
data/pugixml-1.10/tests/test_document.cpp:740:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(path, "%stempfile%d", test_runner::_temp_path, index++);
data/pugixml-1.10/tests/test_parse_doctype.cpp:16:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(buffer, a);
data/pugixml-1.10/tests/test_parse_doctype.cpp:17:2:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
	wcscat(buffer, b);
data/pugixml-1.10/tests/test_parse_doctype.cpp:18:2:  [4] (buffer) wcscat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120).
	wcscat(buffer, c);
data/pugixml-1.10/tests/test_parse_doctype.cpp:20:2:  [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, a);
data/pugixml-1.10/tests/test_parse_doctype.cpp:21:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(buffer, b);
data/pugixml-1.10/tests/test_parse_doctype.cpp:22:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat(buffer, c);
data/pugixml-1.10/docs/samples/load_memory.cpp:28: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(buffer, source, size);
data/pugixml-1.10/docs/samples/load_memory.cpp:47: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(buffer, source, size);
data/pugixml-1.10/docs/samples/save_custom_writer.cpp:45:13:  [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 + result, data, chunk);
data/pugixml-1.10/docs/samples/save_custom_writer.cpp:103: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 large_buf[128];
data/pugixml-1.10/docs/samples/save_custom_writer.cpp:107: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 small_buf[22];
data/pugixml-1.10/src/pugixml.cpp:100:50:  [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.
#define PUGI__STATIC_ASSERT(cond) { static const char condition_failed[(cond) ? 1 : -1] = {0}; (void)condition_failed[0]; }
data/pugixml-1.10/src/pugixml.cpp:122:12:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
using std::memcpy;
data/pugixml-1.10/src/pugixml.cpp:1840:24:  [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.
	static const unsigned char chartype_table[256] =
data/pugixml-1.10/src/pugixml.cpp:1870:24:  [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.
	static const unsigned char chartypex_table[256] =
data/pugixml-1.10/src/pugixml.cpp:2055: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, contents, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:2231: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, data, prefix_length);
data/pugixml-1.10/src/pugixml.cpp:2374:4:  [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(dest, source, source_length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:2390:4:  [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, source, source_length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:3763:4:  [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 + bufsize, data, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:3773: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 + offset, data, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:4670:3:  [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 buf[128];
data/pugixml-1.10/src/pugixml.cpp:4679:3:  [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 buf[128];
data/pugixml-1.10/src/pugixml.cpp:4898:4:  [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(write, chunk->data, chunk->size);
data/pugixml-1.10/src/pugixml.cpp:5007:3:  [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 mode_ascii[4] = {0};
data/pugixml-1.10/src/pugixml.cpp:5011:18:  [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* result = fopen(path_utf8, mode_ascii);
data/pugixml-1.10/src/pugixml.cpp:6168: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(&result[offset], j->name, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:7120:27:  [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).
		auto_deleter<FILE> file(fopen(path_, "rb"), impl::close_file);
data/pugixml-1.10/src/pugixml.cpp:7203:27:  [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).
		auto_deleter<FILE> file(fopen(path_, (flags & format_save_file_text) ? "w" : "wb"), impl::close_file);
data/pugixml-1.10/src/pugixml.cpp:7542:4:  [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 data[xpath_memory_page_size];
data/pugixml-1.10/src/pugixml.cpp:7619: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(result, ptr, old_size);
data/pugixml-1.10/src/pugixml.cpp:7735:4:  [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(result, string, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:7797:22:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				if (!_uses_heap) memcpy(result, _buffer, target_length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:7800: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(result + target_length, o._buffer, source_length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:8207:18:  [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).
		int exponent = atoi(exponent_string + 1);
data/pugixml-1.10/src/pugixml.cpp:8234:3:  [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 mantissa_buffer[32];
data/pugixml-1.10/src/pugixml.cpp:8350: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(scratch, begin, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:8505:12:  [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.
		unsigned char table[128] = {0};
data/pugixml-1.10/src/pugixml.cpp:8530: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(result, table, sizeof(table));
data/pugixml-1.10/src/pugixml.cpp:8647: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(result->name, name, (length + 1) * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:8739: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(scratch, begin, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:8881:4:  [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(_end, begin_, count * sizeof(xpath_node));
data/pugixml-1.10/src/pugixml.cpp:11142:4:  [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(c, value.begin, length * sizeof(char_t));
data/pugixml-1.10/src/pugixml.cpp:12116:4:  [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(storage, begin_, size_ * sizeof(xpath_node));
data/pugixml-1.10/src/pugixml.cpp:12320: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(copy, value, size);
data/pugixml-1.10/src/pugixml.cpp:12689:4:  [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, r.c_str(), (size - 1) * sizeof(char_t));
data/pugixml-1.10/src/pugixml.hpp:1005:3:  [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 _memory[192];
data/pugixml-1.10/tests/allocator.cpp:152: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(result, &size, sizeof(size_t));
data/pugixml-1.10/tests/allocator.cpp:162: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(&result, static_cast<char*>(ptr) - memory_alignment, sizeof(size_t));
data/pugixml-1.10/tests/fuzz_xpath.cpp:9: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(text, Data, Size);
data/pugixml-1.10/tests/test_document.cpp:37:15:  [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* file = fopen(path, "rb");
data/pugixml-1.10/tests/test_document.cpp:735:2:  [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 path[512];
data/pugixml-1.10/tests/test_document.cpp:766:2:  [2] (buffer) wchar_t:
  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.
	wchar_t wpath[sizeof(f.path)];
data/pugixml-1.10/tests/test_document.cpp:796:2:  [2] (buffer) wchar_t:
  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.
	wchar_t wpath[sizeof(f.path)];
data/pugixml-1.10/tests/test_document.cpp:819:2:  [2] (buffer) wchar_t:
  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.
	wchar_t wpath[sizeof(f.path)];
data/pugixml-1.10/tests/test_document.cpp:855: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(text, STR("<?xml?><node/>"), size);
data/pugixml-1.10/tests/test_document.cpp:1170: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(temp, buffer, size);
data/pugixml-1.10/tests/test_document.cpp:1230:2:  [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 buffer[1];
data/pugixml-1.10/tests/test_document.cpp:1266:2:  [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 buffer[1];
data/pugixml-1.10/tests/test_document.cpp:1312:4:  [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(truncated_data, original_data, i);
data/pugixml-1.10/tests/test_document.cpp:1323:4:  [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(truncated_data, original_data, i);
data/pugixml-1.10/tests/test_document.cpp:1340: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(data, "abcd", 4);
data/pugixml-1.10/tests/test_document.cpp:1357: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(data, "abcd", 4);
data/pugixml-1.10/tests/test_document.cpp:1374: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(data, "abcd", 4);
data/pugixml-1.10/tests/test_document.cpp:1510:4:  [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, d.data, j);
data/pugixml-1.10/tests/test_document.cpp:1579:2:  [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 buf[256 + sizeof(xml_document)];
data/pugixml-1.10/tests/test_dom_modify.cpp:1192:2:  [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 data[128] = {0};
data/pugixml-1.10/tests/test_dom_modify.cpp:1232:2:  [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 data[4096] = {0};
data/pugixml-1.10/tests/test_dom_traverse.cpp:797:3:  [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 buf[32];
data/pugixml-1.10/tests/test_dom_traverse.cpp:798:3:  [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(buf, "%d", depth());
data/pugixml-1.10/tests/test_dom_traverse.cpp:801:3:  [2] (buffer) wchar_t:
  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.
		wchar_t wbuf[32];
data/pugixml-1.10/src/pugixml.cpp:217:10:  [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).
		return wcslen(s);
data/pugixml-1.10/src/pugixml.cpp:219:10:  [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 strlen(s);
data/pugixml-1.10/src/pugixml.cpp:251:10:  [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).
		return wcslen(s);
data/pugixml-1.10/src/pugixml.cpp:4646:10:  [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).
		assert(strlen(buf) < sizeof(wbuf) / sizeof(wbuf[0]));
data/pugixml-1.10/src/pugixml.cpp:4653:56:  [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 strcpy_insitu(dest, header, header_mask, buf, strlen(buf));
data/pugixml-1.10/src/pugixml.cpp:4876:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			stream.read(chunk->data, static_cast<std::streamsize>(sizeof(chunk->data) / sizeof(T)));
data/pugixml-1.10/src/pugixml.cpp:4932:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		stream.read(static_cast<T*>(buffer.data), static_cast<std::streamsize>(read_length));
data/pugixml-1.10/src/pugixml.cpp:7244: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).
		return impl::as_wide_impl(str, strlen(str));
data/pugixml-1.10/src/pugixml.cpp:8191: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).
		truncate_zeros(buffer, buffer + strlen(buffer));
data/pugixml-1.10/src/pugixml.cpp:8241: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).
		size_t result_size = strlen(mantissa_buffer) + (exponent > 0 ? exponent : -exponent) + 4;
data/pugixml-1.10/tests/test.cpp:77:9:  [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).
	return wcslen(s);
data/pugixml-1.10/tests/test.cpp:79: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).
	return strlen(s);
data/pugixml-1.10/tests/test_document.cpp:767: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).
	std::copy(f.path, f.path + strlen(f.path) + 1, wpath + 0);
data/pugixml-1.10/tests/test_document.cpp:797: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).
	std::copy(f.path, f.path + strlen(f.path) + 1, wpath + 0);
data/pugixml-1.10/tests/test_document.cpp:820: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).
	std::copy(f.path, f.path + strlen(f.path) + 1, wpath + 0);
data/pugixml-1.10/tests/test_document.cpp:850:16:  [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 size = strlen("<?xml?><node/>") * sizeof(char_t);
data/pugixml-1.10/tests/test_dom_traverse.cpp:684:59:  [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).
		return std::basic_string<char_t>(obj.name()).compare(0, wcslen(prefix), prefix) == 0;
data/pugixml-1.10/tests/test_dom_traverse.cpp:686: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).
		return strncmp(obj.name(), prefix, strlen(prefix)) == 0;
data/pugixml-1.10/tests/test_dom_traverse.cpp:802: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).
		std::copy(buf, buf + strlen(buf) + 1, &wbuf[0]);
data/pugixml-1.10/tests/test_xpath.cpp:657:41:  [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).
	doc.last_child().append_buffer(child2, strlen(child2));
data/pugixml-1.10/tests/test_xpath.cpp:658: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).
	doc.first_child().append_buffer(child1, strlen(child1));

ANALYSIS SUMMARY:

Hits = 95
Lines analyzed = 31962 in approximately 0.90 seconds (35563 lines/second)
Physical Source Lines of Code (SLOC) = 23467
Hits@level = [0]   9 [1]  21 [2]  65 [3]   0 [4]   9 [5]   0
Hits@level+ = [0+] 104 [1+]  95 [2+]  74 [3+]   9 [4+]   9 [5+]   0
Hits/KSLOC@level+ = [0+] 4.43176 [1+] 4.04824 [2+] 3.15336 [3+] 0.383517 [4+] 0.383517 [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.