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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/bitstream.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/bitstream.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/mask.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/mask.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrencode.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrencode.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrencode_inner.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrspec.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrspec.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/rscode.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/rscode.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/split.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/split.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/create_frame_pattern.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/prof_qrencode.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_bitstream.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_estimatebit.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrspec.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_rs.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_split.c Examining data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c FINAL RESULTS: data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:96: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:104: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:147: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:149: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:174: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:176: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:342: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:91: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:153: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:215: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:303: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:389: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/bitstream.c:139: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(bstream->data, arg->data, arg->length); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/bitstream.c:147: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, bstream->data, bstream->length); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/bitstream.c:148: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 + bstream->length, arg->data, arg->length); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/mask.c:291: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, width * width); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:169: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:291: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:356: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:363: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:394: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c:56: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(entry->data, data, size); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c:86:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n->data, entry->data, entry->size); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c:196: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c:381: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.c:1185: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrinput.h:83: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrspec.c:396: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 *frames[QRSPEC_VERSION_MAX + 1]; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrspec.c:528: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(frame, frames[version], width * width); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:23:1: [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 levelChar[4] = {'L', 'M', 'Q', 'H'}; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:24: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:188: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 qrModeChar[4] = {'n', 'a', '8', 'k'}; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:11: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 data[MAX_LENGTH]; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:12: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 check[MAX_LENGTH]; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:57: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:119: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.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(check + i, list->data, list->size); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_monkey.c:313: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:26: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:54: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:312: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:376: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:503: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrencode.c:546: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:12: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:19: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(buf, str, 4); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:98: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:135: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:162: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[8] = "0123456"; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:217: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:224: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:232: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:247: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:248: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:283: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] = "0123456"; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:490: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:506: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:514: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:612: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:620: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:672: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:680: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:739: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:751: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrspec.c:120: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrspec.c:127: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_rs.c:13: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_rs.c:14: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:43: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:212: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:400: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:407: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:438: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:300: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) > 4) { data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrenc.c:301: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) - 4; data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrencode.c:436: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). ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/qrencode.c:596: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). ret = QRinput_append(input, QR_MODE_8, strlen(string), (unsigned char *)string); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/common.h:144: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(correct); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:514: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:588: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:647: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:648: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:712: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:713: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:751: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:758: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:777: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/test_qrinput.c:782: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:212: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/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:274:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/libimager-qrcode-perl-0.033/vendor/qrencode-3.1.1/tests/view_qrcode.c:362: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). ret = QRinput_append(input, QR_MODE_8, strlen(str), (unsigned char *)str); ANALYSIS SUMMARY: Hits = 101 Lines analyzed = 8895 in approximately 0.63 seconds (14018 lines/second) Physical Source Lines of Code (SLOC) = 6560 Hits@level = [0] 136 [1] 18 [2] 71 [3] 6 [4] 6 [5] 0 Hits@level+ = [0+] 237 [1+] 101 [2+] 83 [3+] 12 [4+] 6 [5+] 0 Hits/KSLOC@level+ = [0+] 36.128 [1+] 15.3963 [2+] 12.6524 [3+] 1.82927 [4+] 0.914634 [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.