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/libsavitar-4.8/pugixml/src/pugiconfig.hpp
Examining data/libsavitar-4.8/pugixml/src/pugixml.cpp
Examining data/libsavitar-4.8/pugixml/src/pugixml.hpp
Examining data/libsavitar-4.8/src/Face.cpp
Examining data/libsavitar-4.8/src/Face.h
Examining data/libsavitar-4.8/src/MeshData.h
Examining data/libsavitar-4.8/src/Namespace.cpp
Examining data/libsavitar-4.8/src/Namespace.h
Examining data/libsavitar-4.8/src/Scene.h
Examining data/libsavitar-4.8/src/SceneNode.h
Examining data/libsavitar-4.8/src/ThreeMFParser.cpp
Examining data/libsavitar-4.8/src/Types.h
Examining data/libsavitar-4.8/src/Vertex.cpp
Examining data/libsavitar-4.8/src/Vertex.h
Examining data/libsavitar-4.8/src/MeshData.cpp
Examining data/libsavitar-4.8/src/Scene.cpp
Examining data/libsavitar-4.8/src/SceneNode.cpp
Examining data/libsavitar-4.8/src/ThreeMFParser.h
Examining data/libsavitar-4.8/tests/MeshDataTest.cpp
Examining data/libsavitar-4.8/tests/NamespaceTest.cpp
Examining data/libsavitar-4.8/tests/ThreeMFParserTest.cpp
Examining data/libsavitar-4.8/tests/main.cpp

FINAL RESULTS:

data/libsavitar-4.8/pugixml/src/pugixml.cpp:96: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/libsavitar-4.8/pugixml/src/pugixml.cpp:107: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/libsavitar-4.8/pugixml/src/pugixml.cpp:1818: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/libsavitar-4.8/pugixml/src/pugixml.cpp:1848: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/libsavitar-4.8/pugixml/src/pugixml.cpp:2033: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/libsavitar-4.8/pugixml/src/pugixml.cpp:2209: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/libsavitar-4.8/pugixml/src/pugixml.cpp:2352: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/libsavitar-4.8/pugixml/src/pugixml.cpp:2368: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/libsavitar-4.8/pugixml/src/pugixml.cpp:3741: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/libsavitar-4.8/pugixml/src/pugixml.cpp:3751: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4628: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4629: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, "%.9g", value);
data/libsavitar-4.8/pugixml/src/pugixml.cpp:4637: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4638: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, "%.17g", value);
data/libsavitar-4.8/pugixml/src/pugixml.cpp:4855: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4964: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4968: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/libsavitar-4.8/pugixml/src/pugixml.cpp:6119: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/libsavitar-4.8/pugixml/src/pugixml.cpp:6944: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7027: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7383: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7478: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7601: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7659: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7662: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8069: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(buffer, "%.*e", DBL_DIG, value);
data/libsavitar-4.8/pugixml/src/pugixml.cpp:8077: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8104: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8220: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8375: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8401: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, table, sizeof(table));
data/libsavitar-4.8/pugixml/src/pugixml.cpp:8519: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8611: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8753: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/libsavitar-4.8/pugixml/src/pugixml.cpp:10957: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(c, value.begin, length * sizeof(char_t));
data/libsavitar-4.8/pugixml/src/pugixml.cpp:11929: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/libsavitar-4.8/pugixml/src/pugixml.cpp:12138: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/libsavitar-4.8/pugixml/src/pugixml.cpp:12462: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/libsavitar-4.8/pugixml/src/pugixml.hpp:978: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/libsavitar-4.8/pugixml/src/pugixml.cpp:192: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/libsavitar-4.8/pugixml/src/pugixml.cpp:194: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/libsavitar-4.8/pugixml/src/pugixml.cpp:226: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4604: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4611: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4833: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/libsavitar-4.8/pugixml/src/pugixml.cpp:4889: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/libsavitar-4.8/pugixml/src/pugixml.cpp:7068: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8059: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/libsavitar-4.8/pugixml/src/pugixml.cpp:8070: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(buffer) < buffer_size);
data/libsavitar-4.8/pugixml/src/pugixml.cpp:8111: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;

ANALYSIS SUMMARY:

Hits = 50
Lines analyzed = 15932 in approximately 0.35 seconds (44951 lines/second)
Physical Source Lines of Code (SLOC) = 11222
Hits@level = [0]   1 [1]  11 [2]  39 [3]   0 [4]   0 [5]   0
Hits@level+ = [0+]  51 [1+]  50 [2+]  39 [3+]   0 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.54464 [1+] 4.45553 [2+] 3.47532 [3+]   0 [4+]   0 [5+]   0
Dot directories skipped = 2 (--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.