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/ois-1.3.0+dfsg0/demos/OISConsole.cpp
Examining data/ois-1.3.0+dfsg0/demos/FFConsoleDemo.cpp
Examining data/ois-1.3.0+dfsg0/includes/OISFactoryCreator.h
Examining data/ois-1.3.0+dfsg0/includes/OISConfig.h
Examining data/ois-1.3.0+dfsg0/includes/OISEvents.h
Examining data/ois-1.3.0+dfsg0/includes/OISException.h
Examining data/ois-1.3.0+dfsg0/includes/OIS.h
Examining data/ois-1.3.0+dfsg0/includes/OISKeyboard.h
Examining data/ois-1.3.0+dfsg0/includes/OISForceFeedback.h
Examining data/ois-1.3.0+dfsg0/includes/OISInterface.h
Examining data/ois-1.3.0+dfsg0/includes/OISObject.h
Examining data/ois-1.3.0+dfsg0/includes/OISPrereqs.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxInputManager.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxJoyStickEvents.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxKeyboard.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxMouse.h
Examining data/ois-1.3.0+dfsg0/includes/linux/EventHelpers.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxPrereqs.h
Examining data/ois-1.3.0+dfsg0/includes/linux/LinuxForceFeedback.h
Examining data/ois-1.3.0+dfsg0/includes/OISMouse.h
Examining data/ois-1.3.0+dfsg0/includes/OISMultiTouch.h
Examining data/ois-1.3.0+dfsg0/includes/OISInputManager.h
Examining data/ois-1.3.0+dfsg0/includes/OISJoyStick.h
Examining data/ois-1.3.0+dfsg0/includes/OISEffect.h
Examining data/ois-1.3.0+dfsg0/includes/SDL/SDLInputManager.h
Examining data/ois-1.3.0+dfsg0/includes/SDL/SDLPrereqs.h
Examining data/ois-1.3.0+dfsg0/includes/SDL/SDLKeyboard.h
Examining data/ois-1.3.0+dfsg0/includes/SDL/SDLJoyStick.h
Examining data/ois-1.3.0+dfsg0/includes/SDL/SDLMouse.h
Examining data/ois-1.3.0+dfsg0/src/linux/LinuxInputManager.cpp
Examining data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp
Examining data/ois-1.3.0+dfsg0/src/linux/LinuxMouse.cpp
Examining data/ois-1.3.0+dfsg0/src/linux/LinuxKeyboard.cpp
Examining data/ois-1.3.0+dfsg0/src/linux/LinuxJoyStickEvents.cpp
Examining data/ois-1.3.0+dfsg0/src/linux/LinuxForceFeedback.cpp
Examining data/ois-1.3.0+dfsg0/src/OISInputManager.cpp
Examining data/ois-1.3.0+dfsg0/src/OISKeyboard.cpp
Examining data/ois-1.3.0+dfsg0/src/OISObject.cpp
Examining data/ois-1.3.0+dfsg0/src/OISJoyStick.cpp
Examining data/ois-1.3.0+dfsg0/src/OISEffect.cpp
Examining data/ois-1.3.0+dfsg0/src/OISException.cpp
Examining data/ois-1.3.0+dfsg0/src/OISForceFeedback.cpp
Examining data/ois-1.3.0+dfsg0/src/SDL/SDLJoyStick.cpp
Examining data/ois-1.3.0+dfsg0/src/SDL/SDLMouse.cpp
Examining data/ois-1.3.0+dfsg0/src/SDL/SDLKeyboard.cpp
Examining data/ois-1.3.0+dfsg0/src/SDL/SDLInputManager.cpp

FINAL RESULTS:

data/ois-1.3.0+dfsg0/demos/FFConsoleDemo.cpp:1143:3:  [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.
  system("pause");
data/ois-1.3.0+dfsg0/demos/OISConsole.cpp:49:7:  [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.
const char *g_DeviceType[6] = {"OISUnknown", "OISKeyboard", "OISMouse", "OISJoyStick",
data/ois-1.3.0+dfsg0/includes/OISKeyboard.h:295:30:  [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.
		virtual void copyKeyStates(char keys[256]) const = 0;
data/ois-1.3.0+dfsg0/includes/SDL/SDLKeyboard.h:50:31:  [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.
		virtual void copyKeyStates( char keys[256] );
data/ois-1.3.0+dfsg0/includes/SDL/SDLKeyboard.h:73: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 KeyBuffer[256];
data/ois-1.3.0+dfsg0/includes/linux/LinuxKeyboard.h:46:31:  [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.
		virtual void copyKeyStates( char keys[256] ) const;
data/ois-1.3.0+dfsg0/includes/linux/LinuxKeyboard.h:86: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 KeyBuffer[256];
data/ois-1.3.0+dfsg0/src/SDL/SDLKeyboard.cpp:357:34:  [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.
void SDLKeyboard::copyKeyStates( char keys[256] )
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:55:11:  [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 ev_bits[1 + EV_MAX/8/sizeof(unsigned char)];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:75:17:  [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 abs_bits[1 + ABS_MAX/8/sizeof(unsigned char)];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:111:17:  [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 rel_bits[1 + REL_MAX/8/sizeof(unsigned char)];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:132:17:  [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 key_bits[1 + KEY_MAX/8/sizeof(unsigned char)];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:244: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[OIS_DEVICE_NAME];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:259: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 uId[OIS_DEVICE_UNIQUE_ID];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:274: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 physLoc[OIS_DEVICE_PHYSICAL_LOCATION];
data/ois-1.3.0+dfsg0/src/linux/EventHelpers.cpp:317:11:  [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 ff_bits[1 + FF_MAX/8/sizeof(unsigned char)];
data/ois-1.3.0+dfsg0/src/linux/LinuxForceFeedback.cpp:481: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(linEffect, ffeffect, sizeof(struct ff_effect));
data/ois-1.3.0+dfsg0/src/linux/LinuxForceFeedback.cpp:504: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(linEffect, ffeffect, sizeof(struct ff_effect));
data/ois-1.3.0+dfsg0/src/linux/LinuxJoyStickEvents.cpp:254: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).
		int fd = open( s.str().c_str(), O_RDWR |O_NONBLOCK );
data/ois-1.3.0+dfsg0/src/linux/LinuxKeyboard.cpp:294:14:  [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 buffer[6] = {0,0,0,0,0,0};
data/ois-1.3.0+dfsg0/src/linux/LinuxKeyboard.cpp:428:36:  [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.
void LinuxKeyboard::copyKeyStates( char keys[256] ) const
data/ois-1.3.0+dfsg0/src/linux/LinuxKeyboard.cpp:430: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( keys, KeyBuffer, 256 );
data/ois-1.3.0+dfsg0/src/linux/LinuxMouse.cpp:156: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 mask[4] = {0,1,4,2};
data/ois-1.3.0+dfsg0/demos/FFConsoleDemo.cpp:945: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(1000000.0/_nHartBeatFreq);
data/ois-1.3.0+dfsg0/demos/OISConsole.cpp:178:6:  [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( 500 );
data/ois-1.3.0+dfsg0/demos/OISConsole.cpp:181:6:  [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( 500 );
data/ois-1.3.0+dfsg0/src/linux/LinuxJoyStickEvents.cpp:101:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		int ret = read(mJoyStick, &js, sizeof(struct input_event) * JOY_BUFFERSIZE);

ANALYSIS SUMMARY:

Hits = 27
Lines analyzed = 8045 in approximately 0.22 seconds (37303 lines/second)
Physical Source Lines of Code (SLOC) = 4846
Hits@level = [0]   0 [1]   4 [2]  22 [3]   0 [4]   1 [5]   0
Hits@level+ = [0+]  27 [1+]  27 [2+]  23 [3+]   1 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 5.57161 [1+] 5.57161 [2+] 4.74618 [3+] 0.206356 [4+] 0.206356 [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.