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/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Android-Arm/OniPlatformAndroid-Arm.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Driver/OniDriverAPI.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Driver/OniDriverTypes.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-Arm/OniPlatformLinux-Arm.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-x86/OniPlatformLinux-x86.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/MacOSX/OniPlatformMacOSX.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCAPI.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCEnums.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCProperties.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCTypes.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniEnums.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniProperties.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniVersion.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OpenNI.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PS1080.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PSLink.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PrimeSense.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Win32/OniPlatformWin32.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/ColorStream.cpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/ColorStream.hpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/D2S.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DepthStream.cpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DepthStream.hpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DeviceDriver.cpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/S2D.h
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/Utility.hpp
Examining data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/VideoStream.hpp
Examining data/libfreenect-0.5.3/doc/DoxygenMainpage.h
Examining data/libfreenect-0.5.3/examples/camtest.c
Examining data/libfreenect-0.5.3/examples/chunkview.c
Examining data/libfreenect-0.5.3/examples/glpclview.c
Examining data/libfreenect-0.5.3/examples/glview.c
Examining data/libfreenect-0.5.3/examples/hiview.c
Examining data/libfreenect-0.5.3/examples/micview.c
Examining data/libfreenect-0.5.3/examples/regtest.c
Examining data/libfreenect-0.5.3/examples/regview.c
Examining data/libfreenect-0.5.3/examples/tiltdemo.c
Examining data/libfreenect-0.5.3/examples/wavrecord.c
Examining data/libfreenect-0.5.3/fakenect/fakenect.c
Examining data/libfreenect-0.5.3/fakenect/platform.h
Examining data/libfreenect-0.5.3/fakenect/record.c
Examining data/libfreenect-0.5.3/include/libfreenect.h
Examining data/libfreenect-0.5.3/include/libfreenect_audio.h
Examining data/libfreenect-0.5.3/include/libfreenect_registration.h
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/failguard.cpp
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/failguard.h
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusb.h
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads.h
Examining data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h
Examining data/libfreenect-0.5.3/platform/windows/unistd.h
Examining data/libfreenect-0.5.3/src/audio.c
Examining data/libfreenect-0.5.3/src/cameras.c
Examining data/libfreenect-0.5.3/src/cameras.h
Examining data/libfreenect-0.5.3/src/core.c
Examining data/libfreenect-0.5.3/src/flags.c
Examining data/libfreenect-0.5.3/src/flags.h
Examining data/libfreenect-0.5.3/src/freenect_internal.h
Examining data/libfreenect-0.5.3/src/loader.c
Examining data/libfreenect-0.5.3/src/loader.h
Examining data/libfreenect-0.5.3/src/registration.c
Examining data/libfreenect-0.5.3/src/registration.h
Examining data/libfreenect-0.5.3/src/tilt.c
Examining data/libfreenect-0.5.3/src/usb_libusb10.h
Examining data/libfreenect-0.5.3/src/usb_libusb10.c
Examining data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c
Examining data/libfreenect-0.5.3/wrappers/actionscript/server/as3_jpeg.c
Examining data/libfreenect-0.5.3/wrappers/actionscript/server/as3_jpeg.h
Examining data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c
Examining data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.h
Examining data/libfreenect-0.5.3/wrappers/c_sync/libfreenect_sync.c
Examining data/libfreenect-0.5.3/wrappers/c_sync/libfreenect_sync.h
Examining data/libfreenect-0.5.3/wrappers/cpp/cpp_pc_view.cpp
Examining data/libfreenect-0.5.3/wrappers/cpp/cppview.cpp
Examining data/libfreenect-0.5.3/wrappers/cpp/libfreenect.hpp
Examining data/libfreenect-0.5.3/wrappers/opencv/cvdemo.c
Examining data/libfreenect-0.5.3/wrappers/opencv/libfreenect_cv.c
Examining data/libfreenect-0.5.3/wrappers/opencv/libfreenect_cv.h
Examining data/libfreenect-0.5.3/wrappers/python/freenect.c

FINAL RESULTS:

data/libfreenect-0.5.3/fakenect/platform.h:31:10:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/libfreenect-0.5.3/fakenect/platform.h:31:19:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	#define snprintf _snprintf
data/libfreenect-0.5.3/fakenect/platform.h:32:10:  [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.
	#define popen _popen
data/libfreenect-0.5.3/fakenect/record.c:66:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%c-%f-%u.%s", type, cur_time, timestamp, extension);
data/libfreenect-0.5.3/fakenect/record.c:68:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(fn, "%s/%c-%f-%u.%s", out_dir, type, cur_time, timestamp, extension);
data/libfreenect-0.5.3/fakenect/record.c:93: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* proc = popen(cmd, "w");
data/libfreenect-0.5.3/fakenect/record.c:299:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(index_fn, "%s-index.txt", out_dir);
data/libfreenect-0.5.3/fakenect/record.c:307:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(depth_name, "%s-depth.avi", out_dir);
data/libfreenect-0.5.3/fakenect/record.c:308:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(rgb_name, "%s-rgb.avi", out_dir);
data/libfreenect-0.5.3/fakenect/record.c:337:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(fn, "%s/INDEX.txt", out_dir);
data/libfreenect-0.5.3/src/core.c:273:3:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
		vsnprintf(msgbuf, 1024, fmt, ap);
data/libfreenect-0.5.3/src/core.c:280:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(stderr, fmt, ap);
data/libfreenect-0.5.3/src/freenect_internal.h:79:107:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
void fn_log(freenect_context *ctx, freenect_loglevel level, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
data/libfreenect-0.5.3/src/loader.c:138:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
    sprintf(fw_filename, "/%s", filename);
data/libfreenect-0.5.3/src/loader.c:155:5:  [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(fwfile, envpath);
data/libfreenect-0.5.3/src/loader.c:156:5:  [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(fwfile, fw_filename);
data/libfreenect-0.5.3/src/loader.c:164:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(fwfile, ".%s", fw_filename);
data/libfreenect-0.5.3/src/loader.c:175:5:  [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(fwfile, home);
data/libfreenect-0.5.3/src/loader.c:176:5:  [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(fwfile, dotfolder);
data/libfreenect-0.5.3/src/loader.c:177:5:  [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(fwfile, fw_filename);
data/libfreenect-0.5.3/src/loader.c:185:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(fwfile, "/usr/local/share/libfreenect%s", fw_filename);
data/libfreenect-0.5.3/src/loader.c:191:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(fwfile, "/usr/share/libfreenect%s", fw_filename);
data/libfreenect-0.5.3/src/loader.c:197:17:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
                sprintf(fwfile, "./../Resources%s", fw_filename);
data/libfreenect-0.5.3/wrappers/python/freenect.c:507:5:  [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(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
data/libfreenect-0.5.3/examples/tiltdemo.c:92:2:  [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.
	srand(time(0));
data/libfreenect-0.5.3/fakenect/fakenect.c:114:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	input_path = getenv("FAKENECT_PATH");
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h:215:5:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
    InitializeCriticalSection(&cs);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_threads_win32.h:230:5:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
    EnterCriticalSection(&cs);
data/libfreenect-0.5.3/src/loader.c:150:21:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
				char* envpath = getenv("LIBFREENECT_FIRMWARE_PATH");
data/libfreenect-0.5.3/src/loader.c:168:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
				char* home = getenv("HOME");
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCTypes.h:78: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 uri[ONI_MAX_STR];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCTypes.h:79: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 vendor[ONI_MAX_STR];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniCTypes.h:80: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[ONI_MAX_STR];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OpenNI.h:158: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((void*)m_data, data, count*sizeof(T));
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OpenNI.h:1304:16:  [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).
	inline Status open(const char* uri);
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OpenNI.h:2658:16:  [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).
Status Device::open(const char* uri)
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PSLink.h:126: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 m_strModifier[XN_MAX_VERSION_MODIFIER_LENGTH];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PSLink.h:138: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 creationInfo[80];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PrimeSense.h:105: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[32];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PrimeSense.h:117: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[32];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PrimeSense.h: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[32];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/PrimeSense.h:129: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[32];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DepthStream.hpp:200:11:  [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, S2D, *pDataSize);
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DepthStream.hpp:205:11:  [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, D2S, *pDataSize);
data/libfreenect-0.5.3/examples/chunkview.c:380:24:  [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).
		user_device_number = atoi(argv[1]);
data/libfreenect-0.5.3/examples/glview.c:507:24:  [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).
		user_device_number = atoi(argv[1]);
data/libfreenect-0.5.3/examples/hiview.c:442:24:  [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).
		user_device_number = atoi(argv[1]);
data/libfreenect-0.5.3/examples/micview.c:69: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(&(c->buffers[0][c->current_idx]), mic1, num_samples*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:70: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(&(c->buffers[1][c->current_idx]), mic2, num_samples*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:71: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(&(c->buffers[2][c->current_idx]), mic3, num_samples*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:72: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(&(c->buffers[3][c->current_idx]), mic4, num_samples*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:76: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(&(c->buffers[0][c->current_idx]), mic1, first*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:77: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(&(c->buffers[1][c->current_idx]), mic2, first*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:78: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(&(c->buffers[2][c->current_idx]), mic3, first*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:79: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(&(c->buffers[3][c->current_idx]), mic4, first*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:80: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(c->buffers[0], &mic1[first], left*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:81: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(c->buffers[1], &mic2[first], left*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:82: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(c->buffers[2], &mic3[first], left*sizeof(int32_t));
data/libfreenect-0.5.3/examples/micview.c:83: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(c->buffers[3], &mic4[first], left*sizeof(int32_t));
data/libfreenect-0.5.3/examples/regtest.c:35:13:  [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* fp = fopen(filename, "w");
data/libfreenect-0.5.3/examples/regview.c:360:24:  [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).
		user_device_number = atoi(argv[1]);
data/libfreenect-0.5.3/examples/wavrecord.c:97:22:  [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).
	state.logfiles[0] = fopen("channel1.wav", "wb");
data/libfreenect-0.5.3/examples/wavrecord.c:98:22:  [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).
	state.logfiles[1] = fopen("channel2.wav", "wb");
data/libfreenect-0.5.3/examples/wavrecord.c:99:22:  [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).
	state.logfiles[2] = fopen("channel3.wav", "wb");
data/libfreenect-0.5.3/examples/wavrecord.c:100:22:  [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).
	state.logfiles[3] = fopen("channel4.wav", "wb");
data/libfreenect-0.5.3/examples/wavrecord.c:121: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[4];
data/libfreenect-0.5.3/fakenect/fakenect.c:92:17:  [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 *cur_fp = fopen(file_path, "rb");
data/libfreenect-0.5.3/fakenect/fakenect.c:122:13:  [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).
	index_fp = fopen(index_path, "rb");
data/libfreenect-0.5.3/fakenect/fakenect.c:170: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(depth_buffer, cur_depth, freenect_find_depth_mode(FREENECT_RESOLUTION_MEDIUM, FREENECT_DEPTH_11BIT).bytes);
data/libfreenect-0.5.3/fakenect/fakenect.c:180: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(rgb_buffer, cur_rgb, freenect_find_video_mode(FREENECT_RESOLUTION_MEDIUM, FREENECT_VIDEO_RGB).bytes);
data/libfreenect-0.5.3/fakenect/record.c:69:13:  [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* fp = fopen(fn, "wb");
data/libfreenect-0.5.3/fakenect/record.c:81: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 cmd[1024];
data/libfreenect-0.5.3/fakenect/record.c:244:16:  [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 *fp = fopen(fn, "r");
data/libfreenect-0.5.3/fakenect/record.c:251:10:  [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).
    fp = fopen(fn, "wb");
data/libfreenect-0.5.3/fakenect/record.c:310:7:  [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).
		f = fopen(depth_name, "r");
data/libfreenect-0.5.3/fakenect/record.c:317:7:  [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).
		f = fopen(rgb_name, "r");
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:212: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(desc, &device_desc, sizeof(libusb_device_descriptor));
data/libfreenect-0.5.3/src/audio.c:113: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(dev->audio.cancelled_buffer, &block->samples, 512);
data/libfreenect-0.5.3/src/audio.c:124: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(&(dev->audio.mic_buffer[(block->channel-2) / 2][128]), &block->samples, 512);
data/libfreenect-0.5.3/src/audio.c:126: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(dev->audio.mic_buffer[(block->channel-2) / 2], &block->samples, 512);
data/libfreenect-0.5.3/src/cameras.c:207: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(dbuf, data, datalen);
data/libfreenect-0.5.3/src/cameras.c:667: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 reply[0x200];
data/libfreenect-0.5.3/src/cameras.c:745: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 reply[0x200];
data/libfreenect-0.5.3/src/cameras.c:772: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 reply[0x200];
data/libfreenect-0.5.3/src/cameras.c:798: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 reply[0x200];
data/libfreenect-0.5.3/src/cameras.c:808: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(&(dev->registration.zero_plane_info), reply + 94, sizeof(dev->registration.zero_plane_info));
data/libfreenect-0.5.3/src/core.c:270: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 msgbuf[1024];
data/libfreenect-0.5.3/src/flags.c:159: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(obuf+sizeof(*chdr), cmdbuf, cmd_len);
data/libfreenect-0.5.3/src/flags.c:198: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(replybuf, ibuf+sizeof(*rhdr), reply_len);
data/libfreenect-0.5.3/src/flags.c:200: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(replybuf, ibuf+sizeof(*rhdr), actual_len);
data/libfreenect-0.5.3/src/loader.c:52: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 dump[512];
data/libfreenect-0.5.3/src/loader.c:61: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(&buffer, dump, sizeof(bootloader_status_code));
data/libfreenect-0.5.3/src/loader.c:91: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 buffer[512];
data/libfreenect-0.5.3/src/loader.c:137: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 fw_filename[1024];
data/libfreenect-0.5.3/src/loader.c:202: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).
		fw = fopen(fwfile, "rb");
data/libfreenect-0.5.3/src/loader.c:253: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(&fwheader, readPtr, sizeof(firmware_header));
data/libfreenect-0.5.3/src/loader.c:273: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 page[0x4000];
data/libfreenect-0.5.3/src/loader.c:288:9:  [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(page, &readPtr[readIndex], read);
data/libfreenect-0.5.3/src/loader.c:363:13:  [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* cf = fopen(cemd_filename, "r");
data/libfreenect-0.5.3/src/loader.c:370: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 page[0x4000];
data/libfreenect-0.5.3/src/tilt.c:61: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 buffer[512];
data/libfreenect-0.5.3/src/tilt.c:118: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 buffer[256];
data/libfreenect-0.5.3/src/tilt.c:119: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(buffer, &cmd, 16);
data/libfreenect-0.5.3/src/tilt.c:212: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 buffer[20];
data/libfreenect-0.5.3/src/tilt.c:213: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(buffer, &cmd, 20);
data/libfreenect-0.5.3/src/tilt.c:278: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 buffer[20];
data/libfreenect-0.5.3/src/tilt.c:279: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(buffer, &cmd, 20);
data/libfreenect-0.5.3/src/usb_libusb10.c:156: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 serial[256]; // String descriptors are at most 256 bytes.
data/libfreenect-0.5.3/src/usb_libusb10.c:510:15:  [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 string_desc[256]; // String descriptors are at most 256 bytes
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:189: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(char_depth + (i*2), &depth[i], 2);
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:250: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 buffer_send[3*2+3*8];
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:257: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(&buffer_send,&ax, sizeof(int16_t));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:258: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(&buffer_send[2],&ay, sizeof(int16_t));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:259: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(&buffer_send[4],&az, sizeof(int16_t));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:260: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(&buffer_send[6],&dx, sizeof(double));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:261: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(&buffer_send[14],&dy, sizeof(double));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:262: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(&buffer_send[22],&dz, sizeof(double));
data/libfreenect-0.5.3/wrappers/actionscript/server/as3-server.c:286: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(&value, &buff[2 + (i*6)], sizeof(int));
data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c:84: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(msg, &first, 1);
data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c:85: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(msg + 1, &second, 1);
data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c:86: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(msg + 2, &len, sizeof(int));
data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c:87: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(msg + m_len, data, len);
data/libfreenect-0.5.3/wrappers/python/freenect.c:460:9:  [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 ascii_chars[128];
data/libfreenect-0.5.3/wrappers/python/freenect.c:12579: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 ctversion[4], rtversion[4];
data/libfreenect-0.5.3/wrappers/python/freenect.c:12583:9:  [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[200];
data/libfreenect-0.5.3/wrappers/python/freenect.c:12622: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 warning[200];
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DeviceDriver.cpp:224:16:  [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).
      is.seekg(strlen("freenect://"));
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DeviceDriver.cpp:252:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(info.uri, uri.c_str(), ONI_MAX_STR);
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DeviceDriver.cpp:253:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(info.vendor, "Microsoft", ONI_MAX_STR);
data/libfreenect-0.5.3/OpenNI2-FreenectDriver/src/DeviceDriver.cpp:254:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(info.name, "Kinect", ONI_MAX_STR);
data/libfreenect-0.5.3/fakenect/fakenect.c:60:11:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (c = fgetc(fp); !(c == '\n' || c == EOF); c = fgetc(fp))
data/libfreenect-0.5.3/fakenect/fakenect.c:60:52:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	for (c = fgetc(fp); !(c == '\n' || c == EOF); c = fgetc(fp))
data/libfreenect-0.5.3/fakenect/fakenect.c:88:23:  [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).
	int file_path_size = strlen(input_path) + strlen(line) + 50;
data/libfreenect-0.5.3/fakenect/fakenect.c:88:44:  [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).
	int file_path_size = strlen(input_path) + strlen(line) + 50;
data/libfreenect-0.5.3/fakenect/fakenect.c:119: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).
	int index_path_size = strlen(input_path) + 50;
data/libfreenect-0.5.3/fakenect/platform.h:73: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(usec);
data/libfreenect-0.5.3/fakenect/record.c:65:20:  [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).
	char *fn = malloc(strlen(out_dir) + 50);
data/libfreenect-0.5.3/fakenect/record.c:298:27:  [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).
		char *index_fn = malloc(strlen(out_dir) + 50);
data/libfreenect-0.5.3/fakenect/record.c:305:23:  [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).
		depth_name = malloc(strlen(out_dir) + 50);
data/libfreenect-0.5.3/fakenect/record.c:306:21:  [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).
		rgb_name = malloc(strlen(out_dir) + 50);
data/libfreenect-0.5.3/fakenect/record.c:336:21:  [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).
		char *fn = malloc(strlen(out_dir) + 50);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:657:67:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PreprocessTransferNaive(libusb_transfer* transfer, const int read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:658:70:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PreprocessTransferFreenect(libusb_transfer* transfer, const int read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:750:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      if (-5 == read)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:816:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  if (read >= 0)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:829:31:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    transfer->actual_length = read;
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:854:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    switch(read)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:900:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  return(read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:905:67:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PreprocessTransferNaive(libusb_transfer* transfer, const int read)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:907:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned int remaining (read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:925:70:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
void PreprocessTransferFreenect(libusb_transfer* transfer, const int read)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:953:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	unsigned int remaining (read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:991:60:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		  fprintf(stdout, "%d remaining out of %d\n", remaining, read);
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu.cpp:992:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		  if (remaining == read)
data/libfreenect-0.5.3/platform/windows/libusb10emu/libusb-1.0/libusbemu_internal.h:293:11:  [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).
  int i = strlen(file);
data/libfreenect-0.5.3/platform/windows/unistd.h:41:13:  [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.
static void usleep(__int64 usec)
data/libfreenect-0.5.3/src/core.c:195:7:  [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).
		if (strlen(item->camera_serial) == strlen(camera_serial) && strcmp(item->camera_serial, camera_serial) == 0) {
data/libfreenect-0.5.3/src/core.c:195:38:  [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).
		if (strlen(item->camera_serial) == strlen(camera_serial) && strcmp(item->camera_serial, camera_serial) == 0) {
data/libfreenect-0.5.3/src/flags.c:63: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(100000);
data/libfreenect-0.5.3/src/flags.c:71: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(100000);
data/libfreenect-0.5.3/src/loader.c:140:23:  [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).
    int filenamelen = strlen(fw_filename);
data/libfreenect-0.5.3/src/loader.c:153:19:  [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).
				int pathlen = strlen(envpath);
data/libfreenect-0.5.3/src/loader.c:171:19:  [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).
				int homelen = strlen(home);
data/libfreenect-0.5.3/src/loader.c:173:20:  [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).
				int locallen = strlen(dotfolder);
data/libfreenect-0.5.3/src/loader.c:281:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if( read > bytesLeft ){
data/libfreenect-0.5.3/src/loader.c:284:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if (read <= 0) {
data/libfreenect-0.5.3/src/loader.c:288:43:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        memcpy(page, &readPtr[readIndex], read);
data/libfreenect-0.5.3/src/loader.c:289:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        readIndex += read;
data/libfreenect-0.5.3/src/loader.c:290:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        bytesLeft -= read;
data/libfreenect-0.5.3/src/loader.c:293:27:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		bootcmd.bytes = fn_le32(read);
data/libfreenect-0.5.3/src/loader.c:305:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while(bytes_sent < read) {
data/libfreenect-0.5.3/src/loader.c:316:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		addr += (uint32_t)read;
data/libfreenect-0.5.3/src/loader.c:318:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	} while (read > 0);
data/libfreenect-0.5.3/src/loader.c:373:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		if(read <= 0) {
data/libfreenect-0.5.3/src/loader.c:378:26:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		cemdcmd.arg1 = fn_le32(read);
data/libfreenect-0.5.3/src/loader.c:390:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while(bytes_sent < read) {
data/libfreenect-0.5.3/src/loader.c:400:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		addr += (uint32_t)read;
data/libfreenect-0.5.3/src/loader.c:402:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	} while (read > 0);
data/libfreenect-0.5.3/src/usb_libusb10.c:578:18:  [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).
								if (r == strlen(audio_serial) && strcmp((char*)string_desc, audio_serial) == 0)
data/libfreenect-0.5.3/wrappers/actionscript/server/freenect_network.c:74:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	n = read(data_child, buff, *len);
data/libfreenect-0.5.3/wrappers/python/freenect.c:128:55:  [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).
  #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict")
data/libfreenect-0.5.3/wrappers/python/freenect.c:398:87:  [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).
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
data/libfreenect-0.5.3/wrappers/python/freenect.c:505:52:  [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).
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
data/libfreenect-0.5.3/wrappers/python/freenect.c:12875:65:  [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 __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));

ANALYSIS SUMMARY:

Hits = 184
Lines analyzed = 34915 in approximately 1.25 seconds (27862 lines/second)
Physical Source Lines of Code (SLOC) = 22933
Hits@level = [0] 143 [1]  58 [2]  96 [3]   6 [4]  24 [5]   0
Hits@level+ = [0+] 327 [1+] 184 [2+] 126 [3+]  30 [4+]  24 [5+]   0
Hits/KSLOC@level+ = [0+] 14.2589 [1+] 8.02337 [2+] 5.49427 [3+] 1.30816 [4+] 1.04653 [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.