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/libimobiledevice-1.3.0/common/debug.c
Examining data/libimobiledevice-1.3.0/common/debug.h
Examining data/libimobiledevice-1.3.0/common/socket.c
Examining data/libimobiledevice-1.3.0/common/socket.h
Examining data/libimobiledevice-1.3.0/common/thread.c
Examining data/libimobiledevice-1.3.0/common/thread.h
Examining data/libimobiledevice-1.3.0/common/userpref.c
Examining data/libimobiledevice-1.3.0/common/userpref.h
Examining data/libimobiledevice-1.3.0/common/utils.c
Examining data/libimobiledevice-1.3.0/common/utils.h
Examining data/libimobiledevice-1.3.0/include/asprintf.h
Examining data/libimobiledevice-1.3.0/include/endianness.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/afc.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/companion_proxy.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/diagnostics_relay.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/file_relay.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/heartbeat.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/house_arrest.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/installation_proxy.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/libimobiledevice.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/misagent.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/mobile_image_mounter.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/mobileactivation.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/mobilebackup.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/mobilebackup2.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/mobilesync.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/notification_proxy.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/preboard.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/property_list_service.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/restore.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/sbservices.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/screenshotr.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/service.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/syslog_relay.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/webinspector.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/debugserver.h
Examining data/libimobiledevice-1.3.0/include/libimobiledevice/lockdown.h
Examining data/libimobiledevice-1.3.0/src/afc.c
Examining data/libimobiledevice-1.3.0/src/afc.h
Examining data/libimobiledevice-1.3.0/src/companion_proxy.c
Examining data/libimobiledevice-1.3.0/src/companion_proxy.h
Examining data/libimobiledevice-1.3.0/src/debugserver.h
Examining data/libimobiledevice-1.3.0/src/device_link_service.c
Examining data/libimobiledevice-1.3.0/src/device_link_service.h
Examining data/libimobiledevice-1.3.0/src/diagnostics_relay.c
Examining data/libimobiledevice-1.3.0/src/diagnostics_relay.h
Examining data/libimobiledevice-1.3.0/src/file_relay.c
Examining data/libimobiledevice-1.3.0/src/file_relay.h
Examining data/libimobiledevice-1.3.0/src/heartbeat.c
Examining data/libimobiledevice-1.3.0/src/heartbeat.h
Examining data/libimobiledevice-1.3.0/src/house_arrest.c
Examining data/libimobiledevice-1.3.0/src/house_arrest.h
Examining data/libimobiledevice-1.3.0/src/idevice.c
Examining data/libimobiledevice-1.3.0/src/idevice.h
Examining data/libimobiledevice-1.3.0/src/installation_proxy.c
Examining data/libimobiledevice-1.3.0/src/installation_proxy.h
Examining data/libimobiledevice-1.3.0/src/lockdown.h
Examining data/libimobiledevice-1.3.0/src/misagent.c
Examining data/libimobiledevice-1.3.0/src/misagent.h
Examining data/libimobiledevice-1.3.0/src/mobile_image_mounter.c
Examining data/libimobiledevice-1.3.0/src/mobile_image_mounter.h
Examining data/libimobiledevice-1.3.0/src/mobileactivation.c
Examining data/libimobiledevice-1.3.0/src/mobileactivation.h
Examining data/libimobiledevice-1.3.0/src/mobilebackup.c
Examining data/libimobiledevice-1.3.0/src/mobilebackup.h
Examining data/libimobiledevice-1.3.0/src/mobilebackup2.h
Examining data/libimobiledevice-1.3.0/src/mobilesync.c
Examining data/libimobiledevice-1.3.0/src/mobilesync.h
Examining data/libimobiledevice-1.3.0/src/notification_proxy.c
Examining data/libimobiledevice-1.3.0/src/notification_proxy.h
Examining data/libimobiledevice-1.3.0/src/preboard.c
Examining data/libimobiledevice-1.3.0/src/preboard.h
Examining data/libimobiledevice-1.3.0/src/property_list_service.c
Examining data/libimobiledevice-1.3.0/src/property_list_service.h
Examining data/libimobiledevice-1.3.0/src/restore.c
Examining data/libimobiledevice-1.3.0/src/restore.h
Examining data/libimobiledevice-1.3.0/src/sbservices.c
Examining data/libimobiledevice-1.3.0/src/sbservices.h
Examining data/libimobiledevice-1.3.0/src/screenshotr.h
Examining data/libimobiledevice-1.3.0/src/service.c
Examining data/libimobiledevice-1.3.0/src/service.h
Examining data/libimobiledevice-1.3.0/src/syslog_relay.c
Examining data/libimobiledevice-1.3.0/src/syslog_relay.h
Examining data/libimobiledevice-1.3.0/src/webinspector.c
Examining data/libimobiledevice-1.3.0/src/webinspector.h
Examining data/libimobiledevice-1.3.0/src/mobilebackup2.c
Examining data/libimobiledevice-1.3.0/src/screenshotr.c
Examining data/libimobiledevice-1.3.0/src/debugserver.c
Examining data/libimobiledevice-1.3.0/src/lockdown.c
Examining data/libimobiledevice-1.3.0/tools/idevice_id.c
Examining data/libimobiledevice-1.3.0/tools/idevicebackup.c
Examining data/libimobiledevice-1.3.0/tools/idevicebackup2.c
Examining data/libimobiledevice-1.3.0/tools/idevicecrashreport.c
Examining data/libimobiledevice-1.3.0/tools/idevicedate.c
Examining data/libimobiledevice-1.3.0/tools/idevicedebug.c
Examining data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c
Examining data/libimobiledevice-1.3.0/tools/idevicediagnostics.c
Examining data/libimobiledevice-1.3.0/tools/ideviceenterrecovery.c
Examining data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c
Examining data/libimobiledevice-1.3.0/tools/ideviceinfo.c
Examining data/libimobiledevice-1.3.0/tools/idevicename.c
Examining data/libimobiledevice-1.3.0/tools/idevicenotificationproxy.c
Examining data/libimobiledevice-1.3.0/tools/idevicepair.c
Examining data/libimobiledevice-1.3.0/tools/ideviceprovision.c
Examining data/libimobiledevice-1.3.0/tools/idevicescreenshot.c
Examining data/libimobiledevice-1.3.0/tools/idevicesetlocation.c
Examining data/libimobiledevice-1.3.0/tools/idevicesyslog.c

FINAL RESULTS:

data/libimobiledevice-1.3.0/common/utils.c:56:2:  [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(s1, s2);
data/libimobiledevice-1.3.0/common/utils.c:176:2:  [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(out, elem);
data/libimobiledevice-1.3.0/common/utils.c:182:3:  [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(out, arg);
data/libimobiledevice-1.3.0/include/asprintf.h:13:8:  [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.
	res = vsnprintf(buf, 16, TEMPLATE, AP);
data/libimobiledevice-1.3.0/include/asprintf.h:16:9:  [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.
		res = vsnprintf(*PTR, res+1, TEMPLATE, AP);
data/libimobiledevice-1.3.0/src/debugserver.c:406:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(buffer, command_prefix);
data/libimobiledevice-1.3.0/src/debugserver.c:420: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(buffer, command_prefix);
data/libimobiledevice-1.3.0/src/debugserver.c:424: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(buffer, command_prefix);
data/libimobiledevice-1.3.0/src/debugserver.c:454:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buffer, data);
data/libimobiledevice-1.3.0/src/installation_proxy.c:1051:2:  [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(ret, path_str);
data/libimobiledevice-1.3.0/src/installation_proxy.c:1053:2:  [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(ret, exec_str);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:316:2:  [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(filename, name);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:318:3:  [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(filename, extension);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:539:2:  [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(fnstr, domain);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:541:2:  [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(fnstr, destpath);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:73:67:  [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.
#define PRINT_VERBOSE(min_level, ...) if (verbose >= min_level) { printf(__VA_ARGS__); };
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:517:3:  [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(fname, itunesfiles[i]);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:124:2:  [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(source_filename, device_directory);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:131:2:  [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(target_filename, host_directory);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:148:3:  [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(((char*)source_filename) + device_directory_length, list[k]);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:158:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(((char*)target_filename) + host_directory_length, list[k]);
data/libimobiledevice-1.3.0/tools/idevicedebug.c:49:47:  [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.
#define log_debug(...) if (debug_level > 0) { printf(__VA_ARGS__); fputc('\n', stdout); }
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:40:19:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define info(...) fprintf(stdout, __VA_ARGS__); fflush(stdout)
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:41:35:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define debug(...) if(debug_mode) fprintf(stdout, __VA_ARGS__)
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:573:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
							sprintf(pfname, "%s/%s.mobileprovision", (param2) ? param2 : param, p_uuid);
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:575:8:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
							sprintf(pfname, "%s/profile%d.mobileprovision", (param2) ? param2 : param, j);
data/libimobiledevice-1.3.0/tools/idevicescreenshot.c:133:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
					sprintf(filename+pos, "%s", fileext);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:444:47:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	serr = syslog_relay_client_new(device, svc, &syslog);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:454:40:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	serr = syslog_relay_start_capture_raw(syslog, syslog_callback, NULL);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:457:28:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		syslog_relay_client_free(syslog);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:474:6:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
	if (syslog) {
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:475:28:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		syslog_relay_client_free(syslog);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:488:8:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		if (!syslog) {
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:499:7:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
		if (syslog && (strcmp(udid, event->udid) == 0)) {
data/libimobiledevice-1.3.0/common/thread.c:93:2:  [3] (misc) InitializeCriticalSection:
  Exceptions can be thrown in low-memory situations. Use
  InitializeCriticalSectionAndSpinCount instead.
	InitializeCriticalSection(mutex);
data/libimobiledevice-1.3.0/common/thread.c:111:2:  [3] (misc) EnterCriticalSection:
  On some versions of Windows, exceptions can be thrown in low-memory
  situations. Use InitializeCriticalSectionAndSpinCount instead.
	EnterCriticalSection(mutex);
data/libimobiledevice-1.3.0/common/utils.c:233: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(NULL));
data/libimobiledevice-1.3.0/tools/idevice_id.c:86:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "dhlnv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:330: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(NULL));
data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c:104:7:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt_long(argc, argv, "hu:lt:xdnv", longopts, NULL);
data/libimobiledevice-1.3.0/tools/ideviceinfo.c:158:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "dhu:nq:k:sxv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/tools/idevicename.c:76:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "du:hnv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/tools/idevicepair.c:115:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "hu:dv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:82:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "dhu:nv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:598:14:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((c = getopt_long(argc, argv, "dhu:nxt:T:m:e:p:qkKv", longopts, NULL)) != -1) {
data/libimobiledevice-1.3.0/common/debug.c:137: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 *f = fopen(file, "wb");
data/libimobiledevice-1.3.0/common/socket.c:544:4:  [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 addrtxt[48];
data/libimobiledevice-1.3.0/common/socket.c:573: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 portstr[8];
data/libimobiledevice-1.3.0/common/socket.c:600:2:  [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(portstr, "%d", port);
data/libimobiledevice-1.3.0/common/userpref.c:145:2:  [2] (buffer) wchar_t:
  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.
	wchar_t path[MAX_PATH+1];
data/libimobiledevice-1.3.0/common/userpref.c:483: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(root_cert_pem.data, bdata, root_cert_pem.size);
data/libimobiledevice-1.3.0/common/userpref.c:493: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(root_key_pem.data, bdata, root_key_pem.size);
data/libimobiledevice-1.3.0/common/userpref.c:503: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(host_cert_pem.data, bdata, host_cert_pem.size);
data/libimobiledevice-1.3.0/common/userpref.c:513: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(host_key_pem.data, bdata, host_key_pem.size);
data/libimobiledevice-1.3.0/common/userpref.c:564: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_cert_pem.data, bdata, dev_cert_pem.size);
data/libimobiledevice-1.3.0/common/userpref.c:717: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 hash[hash_size];
data/libimobiledevice-1.3.0/common/userpref.c:884: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(value->data, buffer, length);
data/libimobiledevice-1.3.0/common/utils.c:191: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 buf[80];
data/libimobiledevice-1.3.0/common/utils.c:195: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, "%0.1f TB", sz);
data/libimobiledevice-1.3.0/common/utils.c:198: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, "%0.1f GB", sz);
data/libimobiledevice-1.3.0/common/utils.c:201: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, "%0.1f MB", sz);
data/libimobiledevice-1.3.0/common/utils.c:204: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, "%0.1f KB", sz);
data/libimobiledevice-1.3.0/common/utils.c:206: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, "%d Bytes", (int)size);
data/libimobiledevice-1.3.0/common/utils.c:257:6:  [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(filename, "rb");
data/libimobiledevice-1.3.0/common/utils.c:285:6:  [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(filename, "wb");
data/libimobiledevice-1.3.0/common/utils.c:349: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 input[3];
data/libimobiledevice-1.3.0/include/asprintf.h:12: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 buf[16];
data/libimobiledevice-1.3.0/src/afc.c:90: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(client_loc->afc_packet->magic, AFC_MAGIC, AFC_MAGIC_LEN);
data/libimobiledevice-1.3.0/src/afc.c:432: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(AFC_PACKET_DATA_PTR, path, data_len);
data/libimobiledevice-1.3.0/src/afc.c:539: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(AFC_PACKET_DATA_PTR, path, data_len);
data/libimobiledevice-1.3.0/src/afc.c:578: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(AFC_PACKET_DATA_PTR, from, from_len+1);
data/libimobiledevice-1.3.0/src/afc.c:579: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(AFC_PACKET_DATA_PTR + from_len+1, to, to_len+1);
data/libimobiledevice-1.3.0/src/afc.c:611: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(AFC_PACKET_DATA_PTR, path, data_len);
data/libimobiledevice-1.3.0/src/afc.c:646: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(AFC_PACKET_DATA_PTR, path, data_len);
data/libimobiledevice-1.3.0/src/afc.c:689: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(AFC_PACKET_DATA_PTR + 8, filename, data_len-8);
data/libimobiledevice-1.3.0/src/afc.c:703: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(handle, data, sizeof(uint64_t));
data/libimobiledevice-1.3.0/src/afc.c:761: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(data + current_count, input, (bytes_loc > length) ? length : bytes_loc);
data/libimobiledevice-1.3.0/src/afc.c:931: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(position, buffer, sizeof(uint64_t));
data/libimobiledevice-1.3.0/src/afc.c:992: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(AFC_PACKET_DATA_PTR + 8, path, data_len-8);
data/libimobiledevice-1.3.0/src/afc.c:1033: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(AFC_PACKET_DATA_PTR + 8, target, target_len + 1);
data/libimobiledevice-1.3.0/src/afc.c:1034: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(AFC_PACKET_DATA_PTR + 8 + target_len + 1, linkname, link_len + 1);
data/libimobiledevice-1.3.0/src/afc.c:1067: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(AFC_PACKET_DATA_PTR + 8, path, data_len-8);
data/libimobiledevice-1.3.0/src/afc.c:1099: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(AFC_PACKET_DATA_PTR, path, data_len);
data/libimobiledevice-1.3.0/src/afc.h:37: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 magic[AFC_MAGIC_LEN];
data/libimobiledevice-1.3.0/src/debugserver.c:301: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 checksum_hash[DEBUGSERVER_CHECKSUM_HASH_LENGTH + 1] = {'#', '0', '0', '\0'};
data/libimobiledevice-1.3.0/src/debugserver.c:375: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(received_char, &buffer, sizeof(char));
data/libimobiledevice-1.3.0/src/debugserver.c:397: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 ack[2] = {'+', '\0'};
data/libimobiledevice-1.3.0/src/debugserver.c:438:4:  [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 data[2] = {'#', '\0'};
data/libimobiledevice-1.3.0/src/debugserver.c:463: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(*response, buffer + 1, resp_size);
data/libimobiledevice-1.3.0/src/debugserver.c:614: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(pktp, prefix, strlen(prefix));
data/libimobiledevice-1.3.0/src/debugserver.c:617: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(pktp, m, arg_hexlen);
data/libimobiledevice-1.3.0/src/idevice.c:261: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(newlist[newcount]->conn_data, dev_list[i].conn_data, addrlen);
data/libimobiledevice-1.3.0/src/idevice.c:362: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(device->conn_data, muxdev->conn_data, len);
data/libimobiledevice-1.3.0/src/idevice.c:444: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(&saddr->sa_data[0], (char*)device->conn_data + 2, 14);
data/libimobiledevice-1.3.0/src/idevice.c:450: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(&saddr->sa_data[0], (char*)device->conn_data + 2, 26);
data/libimobiledevice-1.3.0/src/idevice.c:461: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 addrtxt[48];
data/libimobiledevice-1.3.0/src/idevice.c:840: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(buffer + pos_start_fill, recv_buffer, bytes);
data/libimobiledevice-1.3.0/src/webinspector.c:230: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(packet + packet_length, buffer, length);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:113:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE *f = fopen(path, "rb");
data/libimobiledevice-1.3.0/tools/idevicebackup.c:115: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 buf[16384];
data/libimobiledevice-1.3.0/tools/idevicebackup.c:203: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(hash_out, newhash, 20);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:460: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 file_hash[20];
data/libimobiledevice-1.3.0/tools/idevicebackup.c:542: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 fnhash[20];
data/libimobiledevice-1.3.0/tools/idevicebackup.c:543: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 fnamehash[41];
data/libimobiledevice-1.3.0/tools/idevicebackup.c:835: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.
		const char *noties[5] = {
data/libimobiledevice-1.3.0/tools/idevicebackup.c:1289:16:  [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 data_sha1[20];
data/libimobiledevice-1.3.0/tools/idevicebackup.c:1430: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 *f = fopen(file_info_path, "rb");
data/libimobiledevice-1.3.0/tools/idevicebackup.c:1441:8:  [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[8192];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:134:12:  [2] (integer) atol:
  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).
			fsize = atol(fileinfo[i+1]);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:516:3:  [2] (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). Risk is low because the source is a constant string.
		strcpy(fname, "/iTunes_Control/iTunes/");
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:754: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 buf[32768];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:820:6:  [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(localfile, "rb");
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:832: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(buf, &nlen, sizeof(nlen));
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:868: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(buf, &nlen, 4);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:880: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(buf, &nlen, 4);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:883: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(buf+slen, errdesc, length);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1001: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 buf[32768];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1073: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(bname, "wb");
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1251: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 buf[BUFSIZ];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1255:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((from = fopen(src, "rb")) == NULL) {
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1261:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((to = fopen(dst, "wb")) == NULL) {
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1371: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 pwbuf[256];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1379: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 pwrep[256];
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1801: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.
		const char *noties[5] = {
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:77:2:  [2] (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). Risk is low because the source is a constant string.
	strcpy(p, ".crash");
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:110: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 source_filename[512];
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:111: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 target_filename[512];
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:190:22:  [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).
				stbuf.st_nlink = atoi(fileinfo[i+1]);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:250:19:  [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* output = fopen(target_filename, "wb");
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:261: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 data[0x1000];
data/libimobiledevice-1.3.0/tools/idevicedate.c:88: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 buffer[80];
data/libimobiledevice-1.3.0/tools/idevicedate.c:119:14:  [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).
			setdate = atoi(argv[i]);
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:95: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 buffer[131072];
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:150: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 buffer[131072];
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:311:12:  [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).
		else if (atoi(argv[i]) > 0) {
data/libimobiledevice-1.3.0/tools/idevicedebugserverproxy.c:312:17:  [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).
			local_port = atoi(argv[i]);
data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c:295: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 sig[8192];
data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c:297: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 *f = fopen(image_sig_path, "rb");
data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c:309: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(image_path, "rb");
data/libimobiledevice-1.3.0/tools/ideviceimagemounter.c:362: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 buf[8192];
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:246:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	FILE* f = fopen(path, "rb");
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:571: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.
						char pfname[512];
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:577: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* f = fopen(pfname, "wb");
data/libimobiledevice-1.3.0/tools/idevicescreenshot.c:135:15:  [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 *f = fopen(filename, "wb");
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:176: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(buf, &l, 4);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:177: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(buf+4, argv[0], latlen);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:180: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(buf+4+latlen, &l, 4);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:181: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(buf+4+latlen+4, argv[1], longlen);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:144: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(procn, start, p-start);
data/libimobiledevice-1.3.0/common/socket.c:155:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(name.sun_path, filename, sizeof(name.sun_path));
data/libimobiledevice-1.3.0/common/socket.c:221:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(name.sun_path, filename, sizeof(name.sun_path));
data/libimobiledevice-1.3.0/common/userpref.c:154:52:  [1] (buffer) wcslen:
  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).
			base_config_dir = userpref_utf16_to_utf8 (path, wcslen(path), NULL, NULL);
data/libimobiledevice-1.3.0/common/userpref.c:168: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(__config_dir)-1;
data/libimobiledevice-1.3.0/common/userpref.c:242: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).
				size_t len = strlen(entry->d_name) - strlen(USERPREF_CONFIG_EXTENSION);
data/libimobiledevice-1.3.0/common/userpref.c:242:42:  [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).
				size_t len = strlen(entry->d_name) - strlen(USERPREF_CONFIG_EXTENSION);
data/libimobiledevice-1.3.0/common/userpref.c:251:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(tmp, entry->d_name, len);
data/libimobiledevice-1.3.0/common/utils.c:58:14:  [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 s1 + strlen(s2);
data/libimobiledevice-1.3.0/common/utils.c:86:8:  [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).
	len = strlen(str) + 1; /* plus 1 for the null terminator */
data/libimobiledevice-1.3.0/common/utils.c:91:10:  [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).
		len += strlen(s);
data/libimobiledevice-1.3.0/common/utils.c:129:9:  [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).
		len = strlen(str);
data/libimobiledevice-1.3.0/common/utils.c:137:10:  [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).
		len += strlen(s);
data/libimobiledevice-1.3.0/common/utils.c:166:12:  [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 len = strlen(elem)+1;
data/libimobiledevice-1.3.0/common/utils.c:170:10:  [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).
		len += strlen(arg)+1;
data/libimobiledevice-1.3.0/common/utils.c:181:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(out, "/");
data/libimobiledevice-1.3.0/common/utils.c:215: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).
	for (i = 0; i < strlen(res); i++) {
data/libimobiledevice-1.3.0/src/afc.c:391:8:  [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).
		j += strlen(list[i]) + 1;
data/libimobiledevice-1.3.0/src/afc.c:424:32:  [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).
	uint32_t data_len = (uint32_t)strlen(path)+1;
data/libimobiledevice-1.3.0/src/afc.c:531:32:  [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).
	uint32_t data_len = (uint32_t)strlen(path)+1;
data/libimobiledevice-1.3.0/src/afc.c:565: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).
	size_t from_len = strlen(from);
data/libimobiledevice-1.3.0/src/afc.c:566: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).
	size_t to_len = strlen(to);
data/libimobiledevice-1.3.0/src/afc.c:603:32:  [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).
	uint32_t data_len = (uint32_t)strlen(path)+1;
data/libimobiledevice-1.3.0/src/afc.c:636:32:  [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).
	uint32_t data_len = (uint32_t)strlen(path)+1;
data/libimobiledevice-1.3.0/src/afc.c:679:33:  [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).
	uint32_t data_len = (uint32_t)(strlen(filename)+1 + 8);
data/libimobiledevice-1.3.0/src/afc.c:983:37:  [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).
	uint32_t data_len = 8 + (uint32_t)(strlen(path)+1);
data/libimobiledevice-1.3.0/src/afc.c:1015:22:  [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).
	size_t target_len = strlen(target);
data/libimobiledevice-1.3.0/src/afc.c:1016: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).
	size_t link_len = strlen(linkname);
data/libimobiledevice-1.3.0/src/afc.c:1058:26:  [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).
	uint32_t data_len = 8 + strlen(path) + 1;
data/libimobiledevice-1.3.0/src/afc.c:1091:22:  [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).
	uint32_t data_len = strlen(path) + 1;
data/libimobiledevice-1.3.0/src/debugserver.c:274: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).
	uint32_t length = strlen(buffer);
data/libimobiledevice-1.3.0/src/debugserver.c:313: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).
	encoded_length = strlen(encoded_command);
data/libimobiledevice-1.3.0/src/debugserver.c:322:10:  [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).
	*size = strlen(prefix) + strlen(encoded_command) + DEBUGSERVER_CHECKSUM_HASH_LENGTH;
data/libimobiledevice-1.3.0/src/debugserver.c:322: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).
	*size = strlen(prefix) + strlen(encoded_command) + DEBUGSERVER_CHECKSUM_HASH_LENGTH;
data/libimobiledevice-1.3.0/src/debugserver.c:582:37:  [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).
		asprintf(&prefix, ",%d,%d,", (int)strlen(argv[i]) * 2, i);
data/libimobiledevice-1.3.0/src/debugserver.c:583: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).
		pkt_len += (int)strlen(prefix) + (int)strlen(argv[i]) * 2;
data/libimobiledevice-1.3.0/src/debugserver.c:583:41:  [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).
		pkt_len += (int)strlen(prefix) + (int)strlen(argv[i]) * 2;
data/libimobiledevice-1.3.0/src/debugserver.c:600:17:  [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 arg_len = strlen(argv[i]);
data/libimobiledevice-1.3.0/src/debugserver.c:614: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).
		memcpy(pktp, prefix, strlen(prefix));
data/libimobiledevice-1.3.0/src/debugserver.c:615: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).
		pktp += strlen(prefix);
data/libimobiledevice-1.3.0/src/device_link_service.c:86: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(cmd_str) < 9) || (strncmp(cmd_str, "DL", 2))) {
data/libimobiledevice-1.3.0/src/installation_proxy.c:1050:28:  [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* ret = (char*)malloc(strlen(path_str) + 1 + strlen(exec_str) + 1);
data/libimobiledevice-1.3.0/src/installation_proxy.c:1050:51:  [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* ret = (char*)malloc(strlen(path_str) + 1 + strlen(exec_str) + 1);
data/libimobiledevice-1.3.0/src/installation_proxy.c:1052:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(ret, "/");
data/libimobiledevice-1.3.0/src/lockdown.c:771:97:  [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).
	plist_dict_set_item(dict, "DeviceCertificate", plist_new_data(pair_record->device_certificate, strlen(pair_record->device_certificate)));
data/libimobiledevice-1.3.0/src/lockdown.c:772:93:  [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).
	plist_dict_set_item(dict, "HostCertificate", plist_new_data(pair_record->host_certificate, strlen(pair_record->host_certificate)));
data/libimobiledevice-1.3.0/src/lockdown.c:774:93:  [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).
	plist_dict_set_item(dict, "RootCertificate", plist_new_data(pair_record->root_certificate, strlen(pair_record->root_certificate)));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:126:32:  [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).
		SHA1_Update(&sha1, destpath, strlen(destpath));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:129:31:  [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).
		gcry_md_write(hd, destpath, strlen(destpath));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:152:31:  [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).
			SHA1_Update(&sha1, domain, strlen(domain));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:154:30:  [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).
			gcry_md_write(hd, domain, strlen(domain));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:170:30:  [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).
			SHA1_Update(&sha1, appid, strlen(appid));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:172:29:  [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).
			gcry_md_write(hd, appid, strlen(appid));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:188:32:  [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).
			SHA1_Update(&sha1, version, strlen(version));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:190:31:  [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).
			gcry_md_write(hd, version, strlen(version));
data/libimobiledevice-1.3.0/tools/idevicebackup.c:315:33:  [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* filename = (char*)malloc(strlen(name)+(extension == NULL ? 0: strlen(extension))+1);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:315:70:  [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* filename = (char*)malloc(strlen(name)+(extension == NULL ? 0: strlen(extension))+1);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:538: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).
	char *fnstr = malloc(strlen(domain) + 1 + strlen(destpath) + 1);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:538: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).
	char *fnstr = malloc(strlen(domain) + 1 + strlen(destpath) + 1);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:540:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat(fnstr, "-");
data/libimobiledevice-1.3.0/tools/idevicebackup.c:545:22:  [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).
	sha1_of_data(fnstr, strlen(fnstr), fnhash);
data/libimobiledevice-1.3.0/tools/idevicebackup.c:928: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(LOCK_WAIT);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:105:6:  [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(notification) == 0) {
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:515:31:  [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 *fname = (char*)malloc(strlen("/iTunes_Control/iTunes/") + strlen(itunesfiles[i]) + 1);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:515:67:  [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 *fname = (char*)malloc(strlen("/iTunes_Control/iTunes/") + strlen(itunesfiles[i]) + 1);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:751: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).
	uint32_t pathlen = strlen(path);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:878:12:  [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).
		length = strlen(errdesc);
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1341:7:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ch = getchar();
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1743:29:  [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 (!backup_password || (strlen(backup_password) == 0)) {
data/libimobiledevice-1.3.0/tools/idevicebackup2.c:1894: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(LOCK_WAIT);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:87:49:  [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).
				buffer_write_to_filename(raw_filename, raw, strlen(raw));
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:125:22:  [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 (source_filename[strlen(source_filename)-1] != '/') {
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:126:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(source_filename, "/");
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:128:32:  [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 device_directory_length = strlen(source_filename);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:132:22:  [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 (target_filename[strlen(target_filename)-1] != '/') {
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:133:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(target_filename, "/");
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:135:30:  [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 host_directory_length = strlen(target_filename);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:154:17:  [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 newlen = strlen(list[k]) - 7;
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:155:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(((char*)target_filename) + host_directory_length, list[k], newlen);
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:195:51:  [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).
				printf("Link: %s\n", (char*)target_filename + strlen(target_directory));
data/libimobiledevice-1.3.0/tools/idevicecrashreport.c:257:88:  [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).
			printf("%s: %s\n", (keep_crash_reports ? "Copy": "Move") , (char*)target_filename + strlen(target_directory));
data/libimobiledevice-1.3.0/tools/idevicedate.c:115: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).
			if (!argv[i] || (strlen(argv[i]) <= 1)) {
data/libimobiledevice-1.3.0/tools/idevicedebug.c:120:36:  [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).
		debugserver_decode_string(r + 1, strlen(r) - 1, &o);
data/libimobiledevice-1.3.0/tools/idevicedebug.c:166: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).
	} else if (r && strlen(r) == 0) {
data/libimobiledevice-1.3.0/tools/idevicedebug.c:259: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).
			if (!argv[i] || (strlen(argv[i]) <= 1) || strchr(argv[i], '=') == NULL) {
data/libimobiledevice-1.3.0/tools/idevicediagnostics.c:159: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).
				if (argv[i] && (strlen(argv[i]) >= 2) && (strncmp(argv[i], "-", 1) != 0)) {
data/libimobiledevice-1.3.0/tools/idevicenotificationproxy.c:165: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).
				if (argv[i] && (strlen(argv[i]) >= 2) && (strncmp(argv[i], "-", 1) != 0)) {
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:330: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).
			if (!argv[i] || (strlen(argv[i]) < 1)) {
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:343: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).
			if (!argv[i] || (strlen(argv[i]) < 1)) {
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:350: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).
			if (argv[i] && (strlen(argv[i]) > 0)) {
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:357: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).
			if (!argv[i] || (strlen(argv[i]) < 1)) {
data/libimobiledevice-1.3.0/tools/ideviceprovision.c:372: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).
			if (!argv[i] || (strlen(argv[i]) < 1)) {
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:171:17:  [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 len = 4 + strlen(argv[0]) + 4 + strlen(argv[1]);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:171:39:  [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 len = 4 + strlen(argv[0]) + 4 + strlen(argv[1]);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:174:12:  [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).
		latlen = strlen(argv[0]);
data/libimobiledevice-1.3.0/tools/idevicesetlocation.c:178:22:  [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).
		uint32_t longlen = strlen(argv[1]);
data/libimobiledevice-1.3.0/tools/idevicesyslog.c:132: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 filter_len = strlen(filterstr);

ANALYSIS SUMMARY:

Hits = 245
Lines analyzed = 32171 in approximately 1.17 seconds (27383 lines/second)
Physical Source Lines of Code (SLOC) = 20904
Hits@level = [0] 799 [1]  96 [2] 104 [3]  11 [4]  34 [5]   0
Hits@level+ = [0+] 1044 [1+] 245 [2+] 149 [3+]  45 [4+]  34 [5+]   0
Hits/KSLOC@level+ = [0+] 49.9426 [1+] 11.7202 [2+] 7.12782 [3+] 2.1527 [4+] 1.62648 [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.