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/liborigin2-20110117/OriginDefaultParser.cpp
Examining data/liborigin2-20110117/Origin750Parser.cpp
Examining data/liborigin2-20110117/Origin610Parser.h
Examining data/liborigin2-20110117/Origin800Parser.h
Examining data/liborigin2-20110117/Origin700Parser.h
Examining data/liborigin2-20110117/OriginFile.cpp
Examining data/liborigin2-20110117/Origin810Parser.h
Examining data/liborigin2-20110117/Origin700Parser.cpp
Examining data/liborigin2-20110117/OriginParser.h
Examining data/liborigin2-20110117/Origin600Parser.h
Examining data/liborigin2-20110117/OriginParser.cpp
Examining data/liborigin2-20110117/Origin600Parser.cpp
Examining data/liborigin2-20110117/Origin800Parser.cpp
Examining data/liborigin2-20110117/Origin810Parser.cpp
Examining data/liborigin2-20110117/Origin610Parser.cpp
Examining data/liborigin2-20110117/OriginDefaultParser.h
Examining data/liborigin2-20110117/OriginObj.h
Examining data/liborigin2-20110117/OriginFile.h
Examining data/liborigin2-20110117/logging.hpp
Examining data/liborigin2-20110117/Origin750Parser.h

FINAL RESULTS:

data/liborigin2-20110117/OriginDefaultParser.cpp:157:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(sname,"%s",strtok(name,"_"));	// spreadsheet name
data/liborigin2-20110117/OriginDefaultParser.cpp:161:4:  [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(sname,cname);
data/liborigin2-20110117/OriginDefaultParser.cpp:162:4:  [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(cname,tmpstr);
data/liborigin2-20110117/Origin610Parser.cpp:1394:6:  [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, "BM", 2);
data/liborigin2-20110117/Origin610Parser.cpp:1396:6:  [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, &filesize, 4);
data/liborigin2-20110117/Origin610Parser.cpp:1399:6:  [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, &d, 4);
data/liborigin2-20110117/Origin610Parser.cpp:1402:6:  [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, &d, 4);
data/liborigin2-20110117/Origin700Parser.cpp:1011:6:  [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, "BM", 2);
data/liborigin2-20110117/Origin700Parser.cpp:1013:6:  [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, &filesize, 4);
data/liborigin2-20110117/Origin700Parser.cpp:1016:6:  [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, &d, 4);
data/liborigin2-20110117/Origin700Parser.cpp:1019:6:  [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, &d, 4);
data/liborigin2-20110117/Origin750Parser.cpp:1599:6:  [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, "BM", 2);
data/liborigin2-20110117/Origin750Parser.cpp:1601:6:  [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, &filesize, 4);
data/liborigin2-20110117/Origin750Parser.cpp:1604:6:  [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, &d, 4);
data/liborigin2-20110117/Origin750Parser.cpp:1607:6:  [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, &d, 4);
data/liborigin2-20110117/Origin800Parser.cpp:1518:6:  [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, "BM", 2);
data/liborigin2-20110117/Origin800Parser.cpp:1520:6:  [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, &filesize, 4);
data/liborigin2-20110117/Origin800Parser.cpp:1523:6:  [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, &d, 4);
data/liborigin2-20110117/Origin800Parser.cpp:1526:6:  [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, &d, 4);
data/liborigin2-20110117/OriginDefaultParser.cpp:75:8:  [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).
	if((f=fopen(fileName.c_str(),"rb")) == NULL ) {
data/liborigin2-20110117/OriginDefaultParser.cpp:80:12:  [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).
	if((debug=fopen("opjfile.log","a")) == NULL ) {
data/liborigin2-20110117/OriginDefaultParser.cpp:86: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 vers[5];
data/liborigin2-20110117/OriginDefaultParser.cpp:92:16:  [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 version = atoi(vers);
data/liborigin2-20110117/OriginDefaultParser.cpp:123: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 name[25], valuesize;
data/liborigin2-20110117/OriginDefaultParser.cpp:156: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 sname[26];
data/liborigin2-20110117/OriginObj.h:65:13:  [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 custom[3];
data/liborigin2-20110117/OriginObj.h:636: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(data, bitmap.data, size);
data/liborigin2-20110117/Origin610Parser.cpp:981:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(reinterpret_cast<char*>(&layer.clientRect), sizeof(Rect));
data/liborigin2-20110117/Origin610Parser.cpp:1025:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(reinterpret_cast<char*>(&r), sizeof(Rect));
data/liborigin2-20110117/Origin610Parser.cpp:1404:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					file.read(reinterpret_cast<char*>(data), size);
data/liborigin2-20110117/Origin700Parser.cpp:653:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(reinterpret_cast<char*>(&layer.clientRect), sizeof(Rect));
data/liborigin2-20110117/Origin700Parser.cpp:687:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(reinterpret_cast<char*>(&r), sizeof(Rect));
data/liborigin2-20110117/Origin700Parser.cpp:1021:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					file.read(reinterpret_cast<char*>(data), size);
data/liborigin2-20110117/Origin750Parser.cpp:1241:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(reinterpret_cast<char*>(&layer.clientRect), sizeof(Rect));
data/liborigin2-20110117/Origin750Parser.cpp:1271:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(reinterpret_cast<char*>(&r), sizeof(Rect));
data/liborigin2-20110117/Origin750Parser.cpp:1609:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					file.read(reinterpret_cast<char*>(data), size);
data/liborigin2-20110117/Origin750Parser.cpp:2346:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	file.read(reinterpret_cast<char*>(&window.frameRect), sizeof(window.frameRect));
data/liborigin2-20110117/Origin800Parser.cpp:1163:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		file.read(reinterpret_cast<char*>(&layer.clientRect), sizeof(Rect));
data/liborigin2-20110117/Origin800Parser.cpp:1193:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			file.read(reinterpret_cast<char*>(&r), sizeof(Rect));
data/liborigin2-20110117/Origin800Parser.cpp:1528:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					file.read(reinterpret_cast<char*>(data), size);
data/liborigin2-20110117/OriginDefaultParser.cpp:160:4:  [1] (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). Risk is low because the
  source is a constant character.
			strcat(sname,"_");

ANALYSIS SUMMARY:

Hits = 41
Lines analyzed = 10908 in approximately 0.30 seconds (36249 lines/second)
Physical Source Lines of Code (SLOC) = 8370
Hits@level = [0]  88 [1]  14 [2]  24 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+] 129 [1+]  41 [2+]  27 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 15.4122 [1+] 4.89845 [2+] 3.22581 [3+] 0.358423 [4+] 0.358423 [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.