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/ydotool-0.1.8/Client/ydotool.cpp
Examining data/ydotool-0.1.8/Client/ydotool.hpp
Examining data/ydotool-0.1.8/CommonIncludes.hpp
Examining data/ydotool-0.1.8/Daemon/ydotoold.cpp
Examining data/ydotool-0.1.8/Daemon/ydotoold.hpp
Examining data/ydotool-0.1.8/Library/Instance.cpp
Examining data/ydotool-0.1.8/Library/Instance.hpp
Examining data/ydotool-0.1.8/Library/Tool.cpp
Examining data/ydotool-0.1.8/Library/Tool.hpp
Examining data/ydotool-0.1.8/Library/Utils.cpp
Examining data/ydotool-0.1.8/Library/Utils.hpp
Examining data/ydotool-0.1.8/Library/libydotool.cpp
Examining data/ydotool-0.1.8/Library/libydotool.hpp
Examining data/ydotool-0.1.8/Tools/Click/Click.cpp
Examining data/ydotool-0.1.8/Tools/Click/Click.hpp
Examining data/ydotool-0.1.8/Tools/Key/Key.cpp
Examining data/ydotool-0.1.8/Tools/Key/Key.hpp
Examining data/ydotool-0.1.8/Tools/MouseMove/MouseMove.cpp
Examining data/ydotool-0.1.8/Tools/MouseMove/MouseMove.hpp
Examining data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp
Examining data/ydotool-0.1.8/Tools/Recorder/Recorder.hpp
Examining data/ydotool-0.1.8/Tools/Tools.hpp
Examining data/ydotool-0.1.8/Tools/Type/Type.cpp
Examining data/ydotool-0.1.8/Tools/Type/Type.hpp

FINAL RESULTS:

data/ydotool-0.1.8/Daemon/ydotoold.cpp:72:2:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	chmod(path_socket, 0600);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:135:13:  [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).
		fd_file = open(filepath.c_str(), O_WRONLY|O_CREAT, 0644);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:137:13:  [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).
		fd_file = open(filepath.c_str(), O_RDONLY);
data/ydotool-0.1.8/Tools/Recorder/Recorder.hpp:20: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 magic[4];
data/ydotool-0.1.8/Tools/Type/Type.cpp:162:9:  [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).
			fd = open(file_path.c_str(), O_RDONLY);
data/ydotool-0.1.8/Client/ydotool.cpp:65:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, path_socket, sizeof(addr.sun_path)-1);
data/ydotool-0.1.8/Daemon/ydotoold.cpp:60:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(addr.sun_path, path_socket, sizeof(addr.sun_path)-1);
data/ydotool-0.1.8/Tools/Click/Click.cpp:88:3:  [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(time_delay * 1000);
data/ydotool-0.1.8/Tools/Key/Key.cpp:102: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(sleep_time);
data/ydotool-0.1.8/Tools/Key/Key.cpp:107: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(sleep_time);
data/ydotool-0.1.8/Tools/Key/Key.cpp:193:3:  [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(time_delay * 1000);
data/ydotool-0.1.8/Tools/MouseMove/MouseMove.cpp:83:3:  [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(time_delay * 1000);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:171:5:  [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(duration * 1000);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:176: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(delay * 1000);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:181: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(delay * 1000);
data/ydotool-0.1.8/Tools/Recorder/Recorder.cpp:232:3:  [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(dat->delay[0] * 1000000 + dat->delay[1] / 1000);
data/ydotool-0.1.8/Tools/Type/Type.cpp:64: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(sleep_time);
data/ydotool-0.1.8/Tools/Type/Type.cpp:70:3:  [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(sleep_time);
data/ydotool-0.1.8/Tools/Type/Type.cpp:72:3:  [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(sleep_time);
data/ydotool-0.1.8/Tools/Type/Type.cpp:77: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(sleep_time);
data/ydotool-0.1.8/Tools/Type/Type.cpp:173:3:  [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(time_delay * 1000);
data/ydotool-0.1.8/Tools/Type/Type.cpp:180:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while ((rc = read(fd, &buf[0], 128))) {

ANALYSIS SUMMARY:

Hits = 22
Lines analyzed = 1812 in approximately 0.08 seconds (22929 lines/second)
Physical Source Lines of Code (SLOC) = 1100
Hits@level = [0]  16 [1]  17 [2]   4 [3]   0 [4]   0 [5]   1
Hits@level+ = [0+]  38 [1+]  22 [2+]   5 [3+]   1 [4+]   1 [5+]   1
Hits/KSLOC@level+ = [0+] 34.5455 [1+]  20 [2+] 4.54545 [3+] 0.909091 [4+] 0.909091 [5+] 0.909091
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.