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/libwebcam-0.2.4/uvcdynctrl/cmdline.c
Examining data/libwebcam-0.2.4/uvcdynctrl/controls.c
Examining data/libwebcam-0.2.4/uvcdynctrl/controls.h
Examining data/libwebcam-0.2.4/uvcdynctrl/cmdline.h
Examining data/libwebcam-0.2.4/uvcdynctrl/main.c
Examining data/libwebcam-0.2.4/libwebcam/test.c
Examining data/libwebcam-0.2.4/libwebcam/libwebcam.c
Examining data/libwebcam-0.2.4/libwebcam/compat.h
Examining data/libwebcam-0.2.4/libwebcam/libwebcam.h
Examining data/libwebcam-0.2.4/libwebcam/dynctrl.c
Examining data/libwebcam-0.2.4/common/build/cmake_try_v4l2_ctrl_type_string.c
Examining data/libwebcam-0.2.4/common/include/webcam.h
Examining data/libwebcam-0.2.4/common/include/dynctrl-logitech.h
Examining data/libwebcam-0.2.4/debian/patches/install-dynctrl-logitech.h

FINAL RESULTS:

data/libwebcam-0.2.4/libwebcam/dynctrl.c:799: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(new_text, msg->text);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1816:2:  [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.
	printf(PRINT_PREFIX);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1817:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, ap);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1829:2:  [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.
	fprintf(stderr, PRINT_PREFIX "ERROR: ");
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1832:2:  [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, format, ap);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1844:2:  [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.
	fprintf(stderr, PRINT_PREFIX "Warning: ");
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1847:2:  [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, format, ap);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1863:2:  [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.
	printf(PRINT_PREFIX);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1864:2:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vprintf(format, ap);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1464:29:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
                            sscanf(line, "ID{0x%*x};CHK{%*i:%*i:%*i:0}==STR{\"%s\"}", str);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1471:33:  [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(current->control.value.raw.data, str);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1623:2:  [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, newformat, ap);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1657:2:  [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, newformat, ap);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2450: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(dev->v4l2_name, name);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2686:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(dev_node, "/dev/%s", device_name);
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:339: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(result, s);
data/libwebcam-0.2.4/uvcdynctrl/main.c:120: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, names[i]);
data/libwebcam-0.2.4/uvcdynctrl/main.c:122: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(buffer, delimiter);
data/libwebcam-0.2.4/uvcdynctrl/main.c:153: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(buffer, control->choices.list[i].name);
data/libwebcam-0.2.4/uvcdynctrl/main.c:155: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(buffer, index_buffer);
data/libwebcam-0.2.4/uvcdynctrl/main.c:158: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, delimiter);
data/libwebcam-0.2.4/uvcdynctrl/main.c:208:15:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
	int result = access (fileName, F_OK); 
data/libwebcam-0.2.4/uvcdynctrl/main.c:645: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 (result, str1); 
data/libwebcam-0.2.4/uvcdynctrl/main.c:878: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(fname, pid);
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:548:11:  [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, "hVli:a:vd:cg:G:s:S:fW:L:", long_options, &option_index);
data/libwebcam-0.2.4/common/include/webcam.h:438: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/libwebcam-0.2.4/common/include/webcam.h:515: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			fourcc[5];
data/libwebcam-0.2.4/libwebcam/dynctrl.c:340:9:  [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).
		min = atoi(end + 1);		
data/libwebcam-0.2.4/libwebcam/dynctrl.c:719: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(guid, constant->guid, GUID_SIZE);
data/libwebcam-0.2.4/libwebcam/dynctrl.c:804: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(&new_messages[ctx->info->message_count - 1], msg, sizeof(CDynctrlMessage));
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1043: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(mapping_info.entity, control->info.entity, GUID_SIZE);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:218: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(current, &elem->device, sizeof(elem->device));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:308: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(info, info_src, sizeof(*info_src));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:394: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(format->format.fourcc, "%c%c%c%c",
data/libwebcam-0.2.4/libwebcam/libwebcam.c:439: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(current, &elem->format, sizeof(elem->format));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:598: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(current, &elem->size, sizeof(elem->size));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:761: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(current, &elem->interval, sizeof(elem->interval));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:849: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(current, &elem->control, sizeof(elem->control));
data/libwebcam-0.2.4/libwebcam/libwebcam.c:854: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(current->name, elem->control.name, name_length + 1);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:869: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(current->choices.list[index].name, elem->control.choices.list[index].name, name_length + 1);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1282: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(filename, "w");
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1382: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(filename, "r");
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1390: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 line[200];
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1463:29:  [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 str[max+1];
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1722: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(ctrl->control.choices.list[ctrl->control.choices.count-1].name, v4l2_menu.name, V4L2_MENU_CTRL_MAX_NAME_SIZE);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2687:13:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	v4l2_dev = open(dev_node, 0);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2844: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 *input = fopen(filename, "r");
data/libwebcam-0.2.4/libwebcam/libwebcam.h:105:76:  [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).
#define HANDLE_OPEN(handle)		((handle) < MAX_HANDLES && GET_HANDLE(handle).open)
data/libwebcam-0.2.4/libwebcam/libwebcam.h:175: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			v4l2_name[NAME_MAX];
data/libwebcam-0.2.4/libwebcam/libwebcam.h:177: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				media_name[NAME_MAX];
data/libwebcam-0.2.4/libwebcam/libwebcam.h:220:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int				open;
data/libwebcam-0.2.4/libwebcam/libwebcam.h:324: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(*target, source, length + 1);
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:308: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).
  outfile = fopen(filename, "w");
data/libwebcam-0.2.4/uvcdynctrl/controls.c:68:22:  [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.
uint8_t convert_byte(char str[2], int base) {
data/libwebcam-0.2.4/uvcdynctrl/controls.c:124: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 str[2];
data/libwebcam-0.2.4/uvcdynctrl/controls.c:240: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).
	value->value = atoi(string);
data/libwebcam-0.2.4/uvcdynctrl/main.c:115: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[14 * ARRAY_SIZE(names)];		// 14 = maximum name length + strlen(delimiter)
data/libwebcam-0.2.4/uvcdynctrl/main.c:149: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 index_buffer[13];
data/libwebcam-0.2.4/uvcdynctrl/main.c:150: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(index_buffer, "[%u]", control->choices.list[i].index);
data/libwebcam-0.2.4/uvcdynctrl/main.c:472: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 media_path[32] = { 0 };
data/libwebcam-0.2.4/uvcdynctrl/main.c:473: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(media_path, "/dev/media%u", device_index);
data/libwebcam-0.2.4/uvcdynctrl/main.c:483:14:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int mcdev = open(media_path, O_RDWR);
data/libwebcam-0.2.4/uvcdynctrl/main.c:835: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 vid[5];
data/libwebcam-0.2.4/uvcdynctrl/main.c:836: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 pid[5];
data/libwebcam-0.2.4/uvcdynctrl/main.c:877: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 fname[9];
data/libwebcam-0.2.4/uvcdynctrl/main.c:879:3:  [2] (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 string.
		strcat(fname,".xml");
data/libwebcam-0.2.4/libwebcam/dynctrl.c:294: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).
	if(string == NULL && strlen(string) != 36)
data/libwebcam-0.2.4/libwebcam/dynctrl.c:493: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).
	unsigned int input_length = strlen(input) + 1;
data/libwebcam-0.2.4/libwebcam/dynctrl.c:538: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).
	ascii_bytes = unicode_bytes = strlen(inbuf) + 1;
data/libwebcam-0.2.4/libwebcam/dynctrl.c:773:58:  [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).
	unsigned int extra_required = sizeof(CDynctrlMessage) + strlen(msg->text) + 1;
data/libwebcam-0.2.4/libwebcam/dynctrl.c:787: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).
		dynamics_length += strlen(old_text) + 1;
data/libwebcam-0.2.4/libwebcam/dynctrl.c:1053:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy((char *)mapping_info.name, name, sizeof(mapping_info.name) - 1);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:398: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).
		req_size += sizeof(CPixelFormat) + strlen(format->format.name) + 1;
data/libwebcam-0.2.4/libwebcam/libwebcam.c:400: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).
			req_size += strlen(format->format.mimeType) + 1;
data/libwebcam-0.2.4/libwebcam/libwebcam.c:852: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).
		unsigned int name_length = strlen(elem->control.name);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:867: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 name_length = strlen(elem->control.choices.list[index].name);
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1465: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).
                            if(strlen(str) > max) //FIXME: should also check (minimum +N*step)
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1721: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((char *)v4l2_menu.name))
data/libwebcam-0.2.4/libwebcam/libwebcam.c:1795: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((char *)v4l2_ctrl->name))
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2167:13:  [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).
			names += strlen(elem->control.name) + 1;
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2174: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).
				choices += strlen(elem->control.choices.list[index].name) + 1;
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2564: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).
	return strlen(device->shortName)	+ 1 +
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2565: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).
		   strlen(device->name)			+ 1 +
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2566: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).
		   strlen(device->driver)		+ 1 +
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2567: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).
		   strlen(device->location)		+ 1;
data/libwebcam-0.2.4/libwebcam/libwebcam.c:2683: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).
	dev_node = (char *)malloc(5 + strlen(device_name) + 1);
data/libwebcam-0.2.4/libwebcam/libwebcam.h:322: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).
	unsigned int length = strlen(source);
data/libwebcam-0.2.4/libwebcam/test.c:34: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).
	unsigned int size = sizeof(CDevice) + (device_name ? strlen(device_name) : 32) + 84;
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:146: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(gengetopt_args_info_purpose) > 0)
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:149: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(gengetopt_args_info_usage) > 0)
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:154: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(gengetopt_args_info_description) > 0)
data/libwebcam-0.2.4/uvcdynctrl/cmdline.c:336: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).
  result = (char*)malloc(strlen(s) + 1);
data/libwebcam-0.2.4/uvcdynctrl/controls.c:103:15:  [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 length = strlen(raw_str);
data/libwebcam-0.2.4/uvcdynctrl/controls.c:255: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).
	value->raw.size = strlen(string)/2 + 1; //at most length/2 + 1
data/libwebcam-0.2.4/uvcdynctrl/main.c:140: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).
		req_size += 1 + strlen(control->choices.list[i].name) + 1 + 12;
data/libwebcam-0.2.4/uvcdynctrl/main.c:142: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).
			req_size += strlen(delimiter);
data/libwebcam-0.2.4/uvcdynctrl/main.c:152: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(buffer, "'");
data/libwebcam-0.2.4/uvcdynctrl/main.c:154: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(buffer, "'");
data/libwebcam-0.2.4/uvcdynctrl/main.c:636: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 str1_len = strlen (str1); 
data/libwebcam-0.2.4/uvcdynctrl/main.c:637: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 str2_len = strlen (str2);

ANALYSIS SUMMARY:

Hits = 100
Lines analyzed = 9516 in approximately 0.26 seconds (36899 lines/second)
Physical Source Lines of Code (SLOC) = 5967
Hits@level = [0] 180 [1]  34 [2]  41 [3]   1 [4]  24 [5]   0
Hits@level+ = [0+] 280 [1+] 100 [2+]  66 [3+]  25 [4+]  24 [5+]   0
Hits/KSLOC@level+ = [0+] 46.9248 [1+] 16.7588 [2+] 11.0608 [3+] 4.18971 [4+] 4.02212 [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.