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/nlkt-0.3.2.6/src/FortunesGetter.cpp
Examining data/nlkt-0.3.2.6/src/FortunesGetter.hpp
Examining data/nlkt-0.3.2.6/src/KeyboardWidget.cpp
Examining data/nlkt-0.3.2.6/src/KeyboardWidget.hpp
Examining data/nlkt-0.3.2.6/src/Layout.cpp
Examining data/nlkt-0.3.2.6/src/Layout.hpp
Examining data/nlkt-0.3.2.6/src/Logic.cpp
Examining data/nlkt-0.3.2.6/src/Logic.hpp
Examining data/nlkt-0.3.2.6/src/MainWidget.cpp
Examining data/nlkt-0.3.2.6/src/MainWidget.hpp
Examining data/nlkt-0.3.2.6/src/Path.hpp
Examining data/nlkt-0.3.2.6/src/ProfileManager.cpp
Examining data/nlkt-0.3.2.6/src/ProfileManager.hpp
Examining data/nlkt-0.3.2.6/src/RichboxWidget.cpp
Examining data/nlkt-0.3.2.6/src/RichboxWidget.hpp
Examining data/nlkt-0.3.2.6/src/Setup.hpp
Examining data/nlkt-0.3.2.6/src/StatsLogic.cpp
Examining data/nlkt-0.3.2.6/src/StatsLogic.hpp
Examining data/nlkt-0.3.2.6/src/StatsWidget.cpp
Examining data/nlkt-0.3.2.6/src/StatsWidget.hpp
Examining data/nlkt-0.3.2.6/src/UserProfile.cpp
Examining data/nlkt-0.3.2.6/src/UserProfile.hpp
Examining data/nlkt-0.3.2.6/src/main.cpp
Examining data/nlkt-0.3.2.6/src/yf/defs.hpp
Examining data/nlkt-0.3.2.6/src/yf/exception/errtypes.hpp
Examining data/nlkt-0.3.2.6/src/yf/exception/exception.cpp
Examining data/nlkt-0.3.2.6/src/yf/exception/exception.hpp
Examining data/nlkt-0.3.2.6/src/yf/exception/messages.hpp
Examining data/nlkt-0.3.2.6/src/yf/random/random.cpp
Examining data/nlkt-0.3.2.6/src/yf/random/random.hpp
Examining data/nlkt-0.3.2.6/src/yf/time/time.cpp
Examining data/nlkt-0.3.2.6/src/yf/time/time.hpp

FINAL RESULTS:

data/nlkt-0.3.2.6/src/FortunesGetter.cpp:144:15:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	FILE* pipe = popen(qPrintable(fortuneCommand), "r");
data/nlkt-0.3.2.6/src/main.cpp:46:39:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	myTranslator.load("nlkt_" + QLocale::system().name(), pathToTranslations);
data/nlkt-0.3.2.6/src/main.cpp:56:7:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	if (!system("test `pgrep -u $(id -u) nlkt | wc -l` -gt 1"))
data/nlkt-0.3.2.6/src/FortunesGetter.cpp:199:28:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		result = candidates[ yf::random::rnd_uint32(static_cast<uint32>(candidates.size())) ];
data/nlkt-0.3.2.6/src/Layout.cpp:99:22:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	using namespace yf::random;
data/nlkt-0.3.2.6/src/Logic.cpp:37:22:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	using namespace yf::random;
data/nlkt-0.3.2.6/src/main.cpp:77:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		yf::random::rnd_init();
data/nlkt-0.3.2.6/src/yf/random/random.cpp:24:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	namespace random
data/nlkt-0.3.2.6/src/yf/random/random.cpp:33:11:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
					std::srand((unsigned)std::time(&tmp_time_struct));
data/nlkt-0.3.2.6/src/yf/random/random.hpp:28:12:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	namespace random
data/nlkt-0.3.2.6/src/FortunesGetter.cpp:50:11:  [2] (misc) open:
  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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/FortunesGetter.cpp:80:12:  [2] (misc) open:
  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 (!fout.open(QIODevice::Append | QIODevice::Text))
data/nlkt-0.3.2.6/src/FortunesGetter.cpp:146:11:  [2] (misc) open:
  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 (!fin.open(pipe, QIODevice::ReadOnly))
data/nlkt-0.3.2.6/src/Layout.cpp:28:11:  [2] (misc) open:
  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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/StatsLogic.cpp:107: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 dayString[1024];
data/nlkt-0.3.2.6/src/UserProfile.cpp:70:11:  [2] (misc) open:
  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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/UserProfile.cpp:96:12:  [2] (misc) open:
  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 (!fout.open(QIODevice::Append | QIODevice::Text))
data/nlkt-0.3.2.6/src/UserProfile.cpp:211:30:  [2] (misc) open:
  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 (!defaultCombinationFile.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/UserProfile.cpp:215:23:  [2] (misc) open:
  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).
	else if (profileFile.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/UserProfile.cpp:221:15:  [2] (misc) open:
  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).
		profileFile.open(QIODevice::WriteOnly | QIODevice::Text);
data/nlkt-0.3.2.6/src/UserProfile.cpp:242:11:  [2] (misc) open:
  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 (!fin.open(QIODevice::ReadOnly | QIODevice::Text))
data/nlkt-0.3.2.6/src/yf/exception/exception.hpp:37: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 __message[line_max];
data/nlkt-0.3.2.6/src/yf/time/time.cpp:67: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[80];
data/nlkt-0.3.2.6/src/yf/time/time.cpp:68: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, "%2d min %.3f sec\n",
data/nlkt-0.3.2.6/src/yf/time/time.cpp:77: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[80];
data/nlkt-0.3.2.6/src/yf/time/time.cpp:78: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, "%.6f sec\n", get_micro_time( mt_beg, mt_end ) );
data/nlkt-0.3.2.6/src/Layout.cpp:25:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void Layout::read(const QString& path)
data/nlkt-0.3.2.6/src/Layout.hpp:27:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	void read(const QString& path);
data/nlkt-0.3.2.6/src/UserProfile.cpp:78:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	this->layout.read(pathToLayouts + this->layoutString);
data/nlkt-0.3.2.6/src/yf/exception/exception.cpp:54:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		std::strncpy( __message, other.__message, sizeof(__message) );
data/nlkt-0.3.2.6/src/yf/exception/exception.cpp:60:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		std::strncpy( __message, other.what(), sizeof(__message) );
data/nlkt-0.3.2.6/src/yf/time/time.hpp:42:4:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
			usleep(milliseconds*1000);

ANALYSIS SUMMARY:

Hits = 32
Lines analyzed = 4309 in approximately 0.19 seconds (22653 lines/second)
Physical Source Lines of Code (SLOC) = 3003
Hits@level = [0]   2 [1]   6 [2]  16 [3]   7 [4]   3 [5]   0
Hits@level+ = [0+]  34 [1+]  32 [2+]  26 [3+]  10 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 11.322 [1+] 10.656 [2+] 8.65801 [3+] 3.33 [4+] 0.999001 [5+]   0
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.