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/qrencode-4.0.2/mask.h
Examining data/qrencode-4.0.2/qrencode.c
Examining data/qrencode-4.0.2/qrspec.c
Examining data/qrencode-4.0.2/split.h
Examining data/qrencode-4.0.2/qrinput.h
Examining data/qrencode-4.0.2/rsecc.c
Examining data/qrencode-4.0.2/qrspec.h
Examining data/qrencode-4.0.2/qrencode.h
Examining data/qrencode-4.0.2/tests/test_qrspec.c
Examining data/qrencode-4.0.2/tests/test_split.c
Examining data/qrencode-4.0.2/tests/common.h
Examining data/qrencode-4.0.2/tests/prof_qrencode.c
Examining data/qrencode-4.0.2/tests/decoder.c
Examining data/qrencode-4.0.2/tests/test_mmask.c
Examining data/qrencode-4.0.2/tests/test_estimatebit.c
Examining data/qrencode-4.0.2/tests/test_mqrspec.c
Examining data/qrencode-4.0.2/tests/test_rs.c
Examining data/qrencode-4.0.2/tests/view_qrcode.c
Examining data/qrencode-4.0.2/tests/datachunk.h
Examining data/qrencode-4.0.2/tests/test_monkey.c
Examining data/qrencode-4.0.2/tests/rsecc_decoder.h
Examining data/qrencode-4.0.2/tests/create_frame_pattern.c
Examining data/qrencode-4.0.2/tests/rscode.h
Examining data/qrencode-4.0.2/tests/test_qrencode.c
Examining data/qrencode-4.0.2/tests/common.c
Examining data/qrencode-4.0.2/tests/test_mask.c
Examining data/qrencode-4.0.2/tests/rscode.c
Examining data/qrencode-4.0.2/tests/test_split_urls.c
Examining data/qrencode-4.0.2/tests/create_mqr_frame_pattern.c
Examining data/qrencode-4.0.2/tests/test_qrinput.c
Examining data/qrencode-4.0.2/tests/rsecc_decoder.c
Examining data/qrencode-4.0.2/tests/pthread_qrencode.c
Examining data/qrencode-4.0.2/tests/test_bitstream.c
Examining data/qrencode-4.0.2/tests/datachunk.c
Examining data/qrencode-4.0.2/tests/decoder.h
Examining data/qrencode-4.0.2/mqrspec.c
Examining data/qrencode-4.0.2/bitstream.c
Examining data/qrencode-4.0.2/qrencode_inner.h
Examining data/qrencode-4.0.2/rsecc.h
Examining data/qrencode-4.0.2/mmask.h
Examining data/qrencode-4.0.2/mmask.c
Examining data/qrencode-4.0.2/mask.c
Examining data/qrencode-4.0.2/qrinput.c
Examining data/qrencode-4.0.2/mqrspec.h
Examining data/qrencode-4.0.2/bitstream.h
Examining data/qrencode-4.0.2/split.c
Examining data/qrencode-4.0.2/qrenc.c

FINAL RESULTS:

data/qrencode-4.0.2/qrenc.c:783: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(buffer, white);
data/qrencode-4.0.2/qrenc.c:792:6:  [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, black);
data/qrencode-4.0.2/qrenc.c:796: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, white);
data/qrencode-4.0.2/qrenc.c:803: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, white);
data/qrencode-4.0.2/tests/common.c:98:3:  [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(data[i]?"1":"0");
data/qrencode-4.0.2/tests/common.h:30:52:  [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.
{assertionNum++;if(!(__exp__)) {assertionFailed++; printf(__VA_ARGS__);}}
data/qrencode-4.0.2/tests/common.h:38:39:  [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 assert_nothing(__exp__, ...) {printf(__VA_ARGS__); __exp__;}
data/qrencode-4.0.2/tests/test_qrinput.c:161: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(correct, correctHead);
data/qrencode-4.0.2/tests/test_qrinput.c:163: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(correct, (i&1)?"00010001":"11101100");
data/qrencode-4.0.2/tests/test_qrinput.c:181: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(correct, correctHead);
data/qrencode-4.0.2/tests/test_qrinput.c:183: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(correct, (i&1)?"00010001":"11101100");
data/qrencode-4.0.2/qrenc.c:1228:15:  [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((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) {
data/qrencode-4.0.2/tests/test_monkey.c:190: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:253: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:295: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:357: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:399: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:461: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(0);
data/qrencode-4.0.2/tests/test_monkey.c:549: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(0);
data/qrencode-4.0.2/tests/view_qrcode.c:472:15:  [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((opt = getopt_long(argc, argv, optstring, options, &lindex)) != -1) {
data/qrencode-4.0.2/bitstream.c:69: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(bstream->data, bits, size);
data/qrencode-4.0.2/bitstream.c:146: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(bstream->data + bstream->length, arg->data, arg->length);
data/qrencode-4.0.2/mask.c:352: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(bestMask, mask, w2);
data/qrencode-4.0.2/qrenc.c:50:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char fg_color[4] = {0, 0, 0, 255};
data/qrencode-4.0.2/qrenc.c:51:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char bg_color[4] = {255, 255, 255, 255};
data/qrencode-4.0.2/qrenc.c:202:31:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static int color_set(unsigned char color[4], const char *value)
data/qrencode-4.0.2/qrenc.c:231:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char data_buffer[MAX_DATA_SIZE];
data/qrencode-4.0.2/qrenc.c:259:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(outfile, "wb");
data/qrencode-4.0.2/qrenc.c:276: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(row, color, 4);
data/qrencode-4.0.2/qrenc.c:311:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(outfile, "wb");
data/qrencode-4.0.2/qrenc.c:427:7:  [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(&row[((margin + x) * size + xx) * 4], fg_color, 4);
data/qrencode-4.0.2/qrenc.c:537: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 fg[7], bg[7];
data/qrencode-4.0.2/qrenc.c:650: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 fg[7], bg[7];
data/qrencode-4.0.2/qrenc.c:732: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(buffer + white_s + realwidth * 2, "\033[0m\n"); // reset to default colors
data/qrencode-4.0.2/qrenc.c:806:4:  [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(buffer, "  ");
data/qrencode-4.0.2/qrenc.c:808: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(buffer, "\033[0m\n");
data/qrencode-4.0.2/qrenc.c:1092: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 filename[FILENAME_MAX];
data/qrencode-4.0.2/qrenc.c:1244: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).
				size = atoi(optarg);
data/qrencode-4.0.2/qrenc.c:1251:15:  [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).
				version = atoi(optarg);
data/qrencode-4.0.2/qrenc.c:1281: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).
				margin = atoi(optarg);
data/qrencode-4.0.2/qrenc.c:1288:11:  [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).
				dpi = atoi(optarg);
data/qrencode-4.0.2/qrenc.c:1378: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.
		intext = (unsigned char *)argv[optind];
data/qrencode-4.0.2/qrenc.c:1382:33:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = infile == NULL ? stdin : fopen(infile,"r");
data/qrencode-4.0.2/qrencode.c:489: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(masked, frame, width * width);
data/qrencode-4.0.2/qrencode.c:565: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(masked, frame, width * width);
data/qrencode-4.0.2/qrinput.c:69:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(entry->data, data, size);
data/qrencode-4.0.2/qrinput.c:100: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(n->data, entry->data, entry->size);
data/qrencode-4.0.2/qrinput.c:251: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 buf[3];
data/qrencode-4.0.2/qrinput.c:278:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char data[4];
data/qrencode-4.0.2/qrinput.c:459:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const signed char QRinput_anTable[128] = {
data/qrencode-4.0.2/qrinput.c:1444: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(data, entry->data, bytes);
data/qrencode-4.0.2/qrinput.h:88:21:  [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.
extern const signed char QRinput_anTable[128];
data/qrencode-4.0.2/rsecc.c:52:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char alpha[symbols + 1];
data/qrencode-4.0.2/rsecc.c:53:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char aindex[symbols + 1];
data/qrencode-4.0.2/rsecc.c:54:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char generator[max_length - min_length + 1][max_generatorSize + 1];
data/qrencode-4.0.2/rsecc.c:55:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char generatorInitialized[max_length - min_length + 1];
data/qrencode-4.0.2/split.c:49:17:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	return (char *)memcpy(newstring, s, len);
data/qrencode-4.0.2/tests/common.c:12:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char levelChar[4] = {'L', 'M', 'Q', 'H'};
data/qrencode-4.0.2/tests/common.c:13:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char *modeStr[5] = {"nm", "an", "8", "kj", "st"};
data/qrencode-4.0.2/tests/common.h:19:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char levelChar[4];
data/qrencode-4.0.2/tests/common.h:20:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern const char *modeStr[5];
data/qrencode-4.0.2/tests/create_frame_pattern.c:48:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(outfile, "wb");
data/qrencode-4.0.2/tests/create_frame_pattern.c:135: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.
	static char str[256];
data/qrencode-4.0.2/tests/create_frame_pattern.c:150: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).
	fp = fopen(filename, "wb");
data/qrencode-4.0.2/tests/create_mqr_frame_pattern.c:48:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(outfile, "wb");
data/qrencode-4.0.2/tests/create_mqr_frame_pattern.c:135: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.
	static char str[256];
data/qrencode-4.0.2/tests/create_mqr_frame_pattern.c:150: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).
	fp = fopen(filename, "wb");
data/qrencode-4.0.2/tests/datachunk.c:53: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 buf[16];
data/qrencode-4.0.2/tests/datachunk.c:166: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(&data[idx], list->data, list->size);
data/qrencode-4.0.2/tests/decoder.c:88: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(q, "%03d", val);
data/qrencode-4.0.2/tests/decoder.c:94: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(q, "%02d", val);
data/qrencode-4.0.2/tests/decoder.c:97: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(q, "%1d", val);
data/qrencode-4.0.2/tests/decoder.c:110:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char decodeAnTable[45] = {
data/qrencode-4.0.2/tests/decoder.c:146: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(q, "%c%c", decodeAnTable[ch], decodeAnTable[cl]);
data/qrencode-4.0.2/tests/decoder.c:152: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(q, "%c", decodeAnTable[val]);
data/qrencode-4.0.2/tests/decoder.c:231: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(q, "%c%c", (val>>8) & 0xff, val & 0xff);
data/qrencode-4.0.2/tests/decoder.c:611:51:  [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.
static BitStream *extractBits(int width, unsigned char *frame, int spec[5])
data/qrencode-4.0.2/tests/rsecc_decoder.c:16:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char alpha[symbols + 1];
data/qrencode-4.0.2/tests/rsecc_decoder.c:17:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char aindex[symbols + 1];
data/qrencode-4.0.2/tests/test_bitstream.c:37: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 data[1] = {0x3a};
data/qrencode-4.0.2/tests/test_bitstream.c:72: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 data[8];
data/qrencode-4.0.2/tests/test_bitstream.c:209: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 data[4] = {0, 1, 0, 1};
data/qrencode-4.0.2/tests/test_estimatebit.c: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 num[9]="01234567";
data/qrencode-4.0.2/tests/test_estimatebit.c:28: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 num[17]="0123456789012345";
data/qrencode-4.0.2/tests/test_estimatebit.c:65: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[6]="AC-42";
data/qrencode-4.0.2/tests/test_estimatebit.c:81:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char str[9]="12345678";
data/qrencode-4.0.2/tests/test_estimatebit.c:114: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 str[4]= {0x93, 0x5f,0xe4, 0xaa};
data/qrencode-4.0.2/tests/test_mask.c:8: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.
static char dot[2] = {'_', '#'};
data/qrencode-4.0.2/tests/test_mask.c:9: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.
static char *maskPatterns[8] = {
data/qrencode-4.0.2/tests/test_mask.c:71: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 frame[w * w], *masked, *p;
data/qrencode-4.0.2/tests/test_mask.c:102: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 frame[w * w], *masked, *p;
data/qrencode-4.0.2/tests/test_mask.c:203: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 frame[64];
data/qrencode-4.0.2/tests/test_mask.c:245:18:  [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.
	static unsigned char pattern[7][15] = {
data/qrencode-4.0.2/tests/test_mask.c:319: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 frame[width * width];
data/qrencode-4.0.2/tests/test_mask.c:323:18:  [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.
	static unsigned char pattern[6][5] = {
data/qrencode-4.0.2/tests/test_mmask.c:7: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.
static char dot[2] = {'_', '#'};
data/qrencode-4.0.2/tests/test_mmask.c:8: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.
static char *maskPatterns[4] = {
data/qrencode-4.0.2/tests/test_mmask.c:42: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 frame[w * w], *masked, *p;
data/qrencode-4.0.2/tests/test_mmask.c:73: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 frame[w * w], *masked, *p;
data/qrencode-4.0.2/tests/test_mmask.c:110: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 pattern[w * w];
data/qrencode-4.0.2/tests/test_monkey.c:11:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char data[MAX_LENGTH];
data/qrencode-4.0.2/tests/test_monkey.c:12:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char check[MAX_LENGTH];
data/qrencode-4.0.2/tests/test_monkey.c:65: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[256];
data/qrencode-4.0.2/tests/test_monkey.c:104:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:109:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:114:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:128:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:144:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:163:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(buf, "w");
data/qrencode-4.0.2/tests/test_monkey.c:219: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(check + i, list->data, list->size);
data/qrencode-4.0.2/tests/test_monkey.c:323: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(check + i, list->data, list->size);
data/qrencode-4.0.2/tests/test_monkey.c:427: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(check + i, list->data, list->size);
data/qrencode-4.0.2/tests/test_monkey.c:559:10:  [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).
		loop = atoi(argv[1]);
data/qrencode-4.0.2/tests/test_qrencode.c:14:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char decodeAnTable[45] = {
data/qrencode-4.0.2/tests/test_qrencode.c: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:74: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:102: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:331: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:440: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 data[7090];
data/qrencode-4.0.2/tests/test_qrencode.c:495: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:538: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 num[9] = "01234567";
data/qrencode-4.0.2/tests/test_qrencode.c:804: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[4000];
data/qrencode-4.0.2/tests/test_qrinput.c:60: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[5]= {0x93, 0x5f, 0xe4, 0xaa, 0x00};
data/qrencode-4.0.2/tests/test_qrinput.c:223: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 correct[153];
data/qrencode-4.0.2/tests/test_qrinput.c:230: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(correct, "010000010000", 12);
data/qrencode-4.0.2/tests/test_qrinput.c:238: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(correct + 140, "000011101100", 12);
data/qrencode-4.0.2/tests/test_qrinput.c:254: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(correct, "010000001111", 12);
data/qrencode-4.0.2/tests/test_qrinput.c:255: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(correct + 132, "00001110110000010001", 20);
data/qrencode-4.0.2/tests/test_qrinput.c:467: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 str[12]= {0x93, 0x5f, 0xe4, 0xaa, 0x81, 0x40, 0x9f, 0xfc, 0xe0, 0x40, 0xeb, 0xbf};
data/qrencode-4.0.2/tests/test_qrinput.c:483: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.
	const char *str[4] = { "an example ", "of four Str", "uctured Appe", "nd symbols,"};
data/qrencode-4.0.2/tests/test_qrinput.c:491:62:  [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.
		QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]);
data/qrencode-4.0.2/tests/test_qrinput.c:608: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(&d1[i], e->data, e->size);
data/qrencode-4.0.2/tests/test_qrinput.c:616: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(&d2[i], e->data, e->size);
data/qrencode-4.0.2/tests/test_qrinput.c:666: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(&d1[i], e->data, e->size);
data/qrencode-4.0.2/tests/test_qrinput.c:674: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(&d2[i], e->data, e->size);
data/qrencode-4.0.2/tests/test_qrinput.c:733: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.
	const char *str[4] = {
data/qrencode-4.0.2/tests/test_qrinput.c:745:62:  [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.
		QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]);
data/qrencode-4.0.2/tests/test_qrspec.c:124: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 buf[QRSPEC_WIDTH_MAX * QRSPEC_WIDTH_MAX];
data/qrencode-4.0.2/tests/test_qrspec.c:133: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).
	fp = fopen("frame", "rb");
data/qrencode-4.0.2/tests/test_rs.c:18:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char str[9] = "01234567";
data/qrencode-4.0.2/tests/test_rs.c:19:18:  [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.
	static unsigned char correct[26] = {
data/qrencode-4.0.2/tests/test_rs.c:41: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 ecc_expected[256], ecc_rscodec[256];
data/qrencode-4.0.2/tests/test_rs.c:75: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 ecc_expected[256], ecc_rscodec[256];
data/qrencode-4.0.2/tests/test_rs.c:96: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 data[256];
data/qrencode-4.0.2/tests/view_qrcode.c:48: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.
static char levelChar[4] = {'L', 'M', 'Q', 'H'};
data/qrencode-4.0.2/tests/view_qrcode.c:265:70:  [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.
			ret = QRinput_append(input, QR_MODE_8, strlen(argv[i]), (unsigned char *)argv[i]);
data/qrencode-4.0.2/tests/view_qrcode.c:483: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).
				size = atoi(optarg);
data/qrencode-4.0.2/tests/view_qrcode.c:490:15:  [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).
				version = atoi(optarg);
data/qrencode-4.0.2/tests/view_qrcode.c:521: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).
				margin = atoi(optarg);
data/qrencode-4.0.2/tests/view_qrcode.c:561: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.
		intext = (unsigned char *)argv[optind];
data/qrencode-4.0.2/qrenc.c:204: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(value);
data/qrencode-4.0.2/qrenc.c:730:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(buffer, white, white_s);
data/qrencode-4.0.2/qrenc.c:759: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).
	white_s = strlen (white); /* Larger space than black */
data/qrencode-4.0.2/qrenc.c:785:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
			strncat(buffer, "  ", 2);
data/qrencode-4.0.2/qrenc.c:799:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
			strncat(buffer, "  ", 2);
data/qrencode-4.0.2/qrenc.c:1134: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).
	suffix_size = strlen(type_suffix);
data/qrencode-4.0.2/qrenc.c:1135:5:  [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(base) > suffix_size) {
data/qrencode-4.0.2/qrenc.c:1136: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).
		q = base + strlen(base) - suffix_size;
data/qrencode-4.0.2/qrenc.c:1379: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((char *)intext);
data/qrencode-4.0.2/qrencode.c:678:56:  [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 QRcode_encodeDataReal((unsigned char *)string, strlen(string), version, level, 0);
data/qrencode-4.0.2/qrencode.c:692:56:  [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 QRcode_encodeDataReal((unsigned char *)string, strlen(string), version, level, 1);
data/qrencode-4.0.2/qrencode.c:850: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).
	return QRcode_encodeDataStructured(strlen(string), (unsigned char *)string, version, level);
data/qrencode-4.0.2/qrencode.c:859: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).
	return QRcode_encodeDataStructuredReal(strlen(string), (unsigned char *)string, version, level, 0, hint, casesensitive);
data/qrencode-4.0.2/split.c:46: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).
	size_t len = strlen(s) + 1;
data/qrencode-4.0.2/tests/test_qrencode.c:771: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).
		assert_equal(strlen(str), qrdata->size, "Lengths of input/output mismatched: %d, expected %d.\n", qrdata->size, (int)strlen(str));
data/qrencode-4.0.2/tests/test_qrencode.c:771:120:  [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).
		assert_equal(strlen(str), qrdata->size, "Lengths of input/output mismatched: %d, expected %d.\n", qrdata->size, (int)strlen(str));
data/qrencode-4.0.2/tests/test_qrencode.c:793: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).
		assert_equal(strlen(str), qrdata->size, "Lengths of input/output mismatched.\n");
data/qrencode-4.0.2/tests/test_qrencode.c:821: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).
		assert_equal(strlen(str), qrdata->size, "Lengths of input/output mismatched.\n");
data/qrencode-4.0.2/tests/test_qrinput.c:21: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).
	QRinput_append(input, mode, strlen(data), (unsigned char *)data);
data/qrencode-4.0.2/tests/test_qrinput.c:47: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).
	QRinput_append(input, mode, strlen(data), (unsigned char *)data);
data/qrencode-4.0.2/tests/test_qrinput.c:491: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).
		QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]);
data/qrencode-4.0.2/tests/test_qrinput.c:564: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).
	QRinput_append(input, QR_MODE_AN, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:586: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).
	QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:643: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).
	QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:644: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).
	QRinput_append(i1, QR_MODE_8, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:706:35:  [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).
	QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:707:35:  [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).
	QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str);
data/qrencode-4.0.2/tests/test_qrinput.c:745: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).
		QRinput_append(input, QR_MODE_8, strlen(str[i]), (unsigned char *)str[i]);
data/qrencode-4.0.2/tests/test_qrinput.c:752: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(text);
data/qrencode-4.0.2/tests/test_qrinput.c:771:35:  [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).
	QRinput_append(input, QR_MODE_8, strlen(text), (unsigned char *)text);
data/qrencode-4.0.2/tests/test_qrinput.c:776: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(text);
data/qrencode-4.0.2/tests/view_qrcode.c:265:43:  [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).
			ret = QRinput_append(input, QR_MODE_8, strlen(argv[i]), (unsigned char *)argv[i]);
data/qrencode-4.0.2/tests/view_qrcode.c:562: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((char *)intext);

ANALYSIS SUMMARY:

Hits = 183
Lines analyzed = 15056 in approximately 0.64 seconds (23667 lines/second)
Physical Source Lines of Code (SLOC) = 11378
Hits@level = [0] 269 [1]  33 [2] 130 [3]   9 [4]  11 [5]   0
Hits@level+ = [0+] 452 [1+] 183 [2+] 150 [3+]  20 [4+]  11 [5+]   0
Hits/KSLOC@level+ = [0+] 39.7258 [1+] 16.0837 [2+] 13.1833 [3+] 1.75778 [4+] 0.966778 [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.