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/pcre2-10.34/src/pcre2posix.h Examining data/pcre2-10.34/src/pcre2_intmodedep.h Examining data/pcre2-10.34/src/pcre2_find_bracket.c Examining data/pcre2-10.34/src/pcre2_newline.c Examining data/pcre2-10.34/src/pcre2posix.c Examining data/pcre2-10.34/src/pcre2_substitute.c Examining data/pcre2-10.34/src/pcre2_match_data.c Examining data/pcre2-10.34/src/pcre2_tables.c Examining data/pcre2-10.34/src/pcre2_ucp.h Examining data/pcre2-10.34/src/dftables.c Examining data/pcre2-10.34/src/pcre2_jit_simd_inc.h Examining data/pcre2-10.34/src/pcre2_config.c Examining data/pcre2-10.34/src/pcre2_jit_test.c Examining data/pcre2-10.34/src/pcre2demo.c Examining data/pcre2-10.34/src/pcre2_serialize.c Examining data/pcre2-10.34/src/pcre2_compile.c Examining data/pcre2-10.34/src/pcre2_jit_match.c Examining data/pcre2-10.34/src/pcre2_study.c Examining data/pcre2-10.34/src/pcre2_script_run.c Examining data/pcre2-10.34/src/pcre2_xclass.c Examining data/pcre2-10.34/src/pcre2_dfa_match.c Examining data/pcre2-10.34/src/pcre2_valid_utf.c Examining data/pcre2-10.34/src/pcre2_substring.c Examining data/pcre2-10.34/src/pcre2_ord2utf.c Examining data/pcre2-10.34/src/pcre2_jit_neon_inc.h Examining data/pcre2-10.34/src/pcre2_extuni.c Examining data/pcre2-10.34/src/sljit/sljitNativeSPARC_common.c Examining data/pcre2-10.34/src/sljit/sljitNativeTILEGX-encoder.c Examining data/pcre2-10.34/src/sljit/sljitConfig.h Examining data/pcre2-10.34/src/sljit/sljitNativeMIPS_64.c Examining data/pcre2-10.34/src/sljit/sljitUtils.c Examining data/pcre2-10.34/src/sljit/sljitNativeARM_T2_32.c Examining data/pcre2-10.34/src/sljit/sljitNativePPC_64.c Examining data/pcre2-10.34/src/sljit/sljitNativeARM_64.c Examining data/pcre2-10.34/src/sljit/sljitNativeMIPS_common.c Examining data/pcre2-10.34/src/sljit/sljitNativeMIPS_32.c Examining data/pcre2-10.34/src/sljit/sljitNativeX86_common.c Examining data/pcre2-10.34/src/sljit/sljitNativeTILEGX_64.c Examining data/pcre2-10.34/src/sljit/sljitNativeSPARC_32.c Examining data/pcre2-10.34/src/sljit/sljitLir.c Examining data/pcre2-10.34/src/sljit/sljitLir.h Examining data/pcre2-10.34/src/sljit/sljitNativeX86_32.c Examining data/pcre2-10.34/src/sljit/sljitNativePPC_32.c Examining data/pcre2-10.34/src/sljit/sljitExecAllocator.c Examining data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c Examining data/pcre2-10.34/src/sljit/sljitNativeX86_64.c Examining data/pcre2-10.34/src/sljit/sljitNativePPC_common.c Examining data/pcre2-10.34/src/sljit/sljitConfigInternal.h Examining data/pcre2-10.34/src/sljit/sljitNativeARM_32.c Examining data/pcre2-10.34/src/pcre2_jit_misc.c Examining data/pcre2-10.34/src/pcre2_auto_possess.c Examining data/pcre2-10.34/src/pcre2_pattern_info.c Examining data/pcre2-10.34/src/pcre2_fuzzsupport.c Examining data/pcre2-10.34/src/pcre2_maketables.c Examining data/pcre2-10.34/src/pcre2_printint.c Examining data/pcre2-10.34/src/pcre2_string_utils.c Examining data/pcre2-10.34/src/pcre2_ucd.c Examining data/pcre2-10.34/src/pcre2test.c Examining data/pcre2-10.34/src/pcre2_convert.c Examining data/pcre2-10.34/src/pcre2_internal.h Examining data/pcre2-10.34/src/pcre2_context.c Examining data/pcre2-10.34/src/pcre2grep.c Examining data/pcre2-10.34/src/pcre2_error.c Examining data/pcre2-10.34/src/pcre2_match.c Examining data/pcre2-10.34/src/pcre2_jit_compile.c FINAL RESULTS: data/pcre2-10.34/src/pcre2_internal.h:84:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2_internal.h:84:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2_match.c:221:1: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(f, s, ap); data/pcre2-10.34/src/pcre2grep.c:110:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2grep.c:110:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2grep.c:1153:1: [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("Usage: pcre2grep [OPTION]... [PATTERN] [FILE1 FILE2 ...]" STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1154:1: [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("Search for PATTERN in each FILE or standard input." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1155:1: [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("PATTERN must be present if neither -e nor -f is used." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1159:1: [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("All callout scripts in patterns are supported." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1161:1: [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("Non-fork callout scripts in patterns are supported." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1164:1: [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("Callout scripts are not supported in this pcre2grep." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1167:1: [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("\"-\" can be used as a file name to mean STDIN." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1170:1: [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("Files whose names end in .gz are read using zlib." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1174:1: [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("Files whose names end in .bz2 are read using bzlib2." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1178:1: [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("Other files and the standard input are read as plain files." STDOUT_NL STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1180:1: [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("All files are read as plain files, without any interpretation." STDOUT_NL STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1183:1: [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("Example: pcre2grep -i " QUOT "hello.*world" QUOT " menu.h main.c" STDOUT_NL STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1184:1: [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("Options:" STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1201: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("%.*s%s" STDOUT_NL, n, " ", op->help_text); data/pcre2-10.34/src/pcre2grep.c:1204:1: [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(STDOUT_NL "Numbers may be followed by K or M, e.g. --max-buffer-size=100K." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1205:1: [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("The default value for --buffer-size is %d." STDOUT_NL, PCRE2GREP_BUFSIZE); data/pcre2-10.34/src/pcre2grep.c:1206:1: [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("The default value for --max-buffer-size is %d." STDOUT_NL, PCRE2GREP_MAX_BUFSIZE); data/pcre2-10.34/src/pcre2grep.c:1207:1: [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("When reading patterns or file names from a file, trailing white" STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1208:1: [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("space is removed and blank lines are ignored." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1209:1: [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("The maximum size of any pattern is %d bytes." STDOUT_NL, MAXPATLEN); data/pcre2-10.34/src/pcre2grep.c:1211:1: [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(STDOUT_NL "With no FILEs, read standard input. If fewer than two FILEs given, assume -h." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1212:1: [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("Exit status is 0 if any matches, 1 if no matches, and 2 if trouble." STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:1992:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:2335: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(cmdbuf, argsvector[i]); data/pcre2-10.34/src/pcre2grep.c:2349:9: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. (void)execv(argsvector[0], argsvector); data/pcre2-10.34/src/pcre2grep.c:2583:11: [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(endptr, jfriedl_prefix); endptr += strlen(jfriedl_prefix); data/pcre2-10.34/src/pcre2grep.c:2588:11: [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(endptr, jfriedl_postfix); endptr += strlen(jfriedl_postfix); data/pcre2-10.34/src/pcre2grep.c:2654:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "Binary file %s matches" STDOUT_NL, filename); data/pcre2-10.34/src/pcre2grep.c:2663:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%s" STDOUT_NL, printname); data/pcre2-10.34/src/pcre2grep.c:2688:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%d,%d" STDOUT_NL, (int)(ptr + offsets[0] - ptr), data/pcre2-10.34/src/pcre2grep.c:2694:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%d,%d" STDOUT_NL, data/pcre2-10.34/src/pcre2grep.c:2705:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:2732:13: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:2815:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "--" STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:2836:11: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "--" STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:3066:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%s" STDOUT_NL, printname); data/pcre2-10.34/src/pcre2grep.c:3078:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%lu" STDOUT_NL, count); data/pcre2-10.34/src/pcre2grep.c:3224:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s%c%s", pathname, FILESEP, nextfile); data/pcre2-10.34/src/pcre2grep.c:3440:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "pcre2grep version %s" STDOUT_NL, buffer); data/pcre2-10.34/src/pcre2grep.c:4373:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, STDOUT_NL); data/pcre2-10.34/src/pcre2grep.c:4383:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stdout, "%lu" STDOUT_NL, total_count); data/pcre2-10.34/src/pcre2posix.c:71:9: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2posix.c:71:18: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. #define snprintf _snprintf data/pcre2-10.34/src/pcre2test.c:2739:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outfile, "malloc %5" SIZ_FORM, SIZ_CAST size); data/pcre2-10.34/src/pcre2test.c:2769:7: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outfile, " %5" SIZ_FORM, SIZ_CAST malloclistlength[i]); data/pcre2-10.34/src/pcre2test.c:5361:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *)locale_name, (char *)pat_patctl.locale); data/pcre2-10.34/src/pcre2test.c:6364:32: [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). if (test_mode == PCRE8_MODE) strcpy((char *)pbuffer8, (char *)nptr); data/pcre2-10.34/src/pcre2test.c:6445:32: [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). if (test_mode == PCRE8_MODE) strcpy((char *)pbuffer8, (char *)nptr); data/pcre2-10.34/src/pcre2test.c:6596:1: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy((char *)dat_datctl.replacement, (char *)pat_patctl.replacement); data/pcre2-10.34/src/pcre2test.c:7917:9: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(outfile, " at offset %" SIZ_FORM, SIZ_CAST startchar); data/pcre2-10.34/src/pcre2test.c:8224:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ucname, coptlist[i].name); data/pcre2-10.34/src/pcre2test.c:8238:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(nam_buf, coptlist[i].name); data/pcre2-10.34/src/sljit/sljitLir.c:1186:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(compiler->verbose, (op & SLJIT_I32_OP) ? "32" : "w"); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:115: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(tmp_name, P_tmpdir); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:131:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmp_name, dir); data/pcre2-10.34/src/pcre2_fuzzsupport.c:80:1: [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((unsigned int)(data[size/2])); data/pcre2-10.34/src/pcre2grep.c:4078:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv("LC_ALL"); data/pcre2-10.34/src/pcre2grep.c:4084:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. locale = getenv("LC_CTYPE"); data/pcre2-10.34/src/pcre2grep.c:4121:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *cs = getenv("PCRE2GREP_COLOUR"); data/pcre2-10.34/src/pcre2grep.c:4122:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (cs == NULL) cs = getenv("PCRE2GREP_COLOR"); data/pcre2-10.34/src/pcre2grep.c:4123:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (cs == NULL) cs = getenv("PCREGREP_COLOUR"); data/pcre2-10.34/src/pcre2grep.c:4124:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (cs == NULL) cs = getenv("PCREGREP_COLOR"); data/pcre2-10.34/src/pcre2grep.c:4125:44: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (cs == NULL) cs = parse_grep_colors(getenv("GREP_COLORS")); data/pcre2-10.34/src/pcre2grep.c:4126:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (cs == NULL) cs = getenv("GREP_COLOR"); data/pcre2-10.34/src/dftables.c:88:5: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(argv[i], "wb"); data/pcre2-10.34/src/pcre2_compile.c:1197:1: [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(newcode, code, code->blocksize); data/pcre2-10.34/src/pcre2_compile.c:1232:1: [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(newcode, code, code->blocksize); data/pcre2-10.34/src/pcre2_compile.c:1242:1: [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(newtables, code->tables, tables_length); data/pcre2-10.34/src/pcre2_compile.c:4580:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newspace, cb->named_groups, data/pcre2-10.34/src/pcre2_compile.c:5734:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pbits, cbits + posix_class_maps[posix_class], data/pcre2-10.34/src/pcre2_compile.c:6075:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, classbits, 32); data/pcre2-10.34/src/pcre2_compile.c:6101: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(code, classbits, 32); data/pcre2-10.34/src/pcre2_compile.c:6185:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, mcbuffer, CU2BYTES(mclength)); data/pcre2-10.34/src/pcre2_compile.c:6916:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mcbuffer, lastchar, CU2BYTES(mclength)); /* Save the char */ data/pcre2-10.34/src/pcre2_compile.c:7023:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, previous, CU2BYTES(1 + LINK_SIZE)); data/pcre2-10.34/src/pcre2_compile.c:7201: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. memcpy(code, previous, CU2BYTES(len)); data/pcre2-10.34/src/pcre2_compile.c:7259:13: [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(code, previous, CU2BYTES(len)); data/pcre2-10.34/src/pcre2_compile.c:7482:15: [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(code, mcbuffer, CU2BYTES(mclength)); data/pcre2-10.34/src/pcre2_compile.c:7519:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, mcbuffer, CU2BYTES(mclength)); data/pcre2-10.34/src/pcre2_compile.c:7883:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(code, mcbuffer, CU2BYTES(mclength)); data/pcre2-10.34/src/pcre2_compile.c:8821:1: [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(slot + IMM2_SIZE, name, CU2BYTES(length)); data/pcre2-10.34/src/pcre2_context.c:235:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new, gcontext, sizeof(pcre2_real_general_context)); data/pcre2-10.34/src/pcre2_context.c:247:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new, ccontext, sizeof(pcre2_real_compile_context)); data/pcre2-10.34/src/pcre2_context.c:259:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new, mcontext, sizeof(pcre2_real_match_context)); data/pcre2-10.34/src/pcre2_context.c:272:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new, ccontext, sizeof(pcre2_real_convert_context)); data/pcre2-10.34/src/pcre2_convert.c:219: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(p, posix - clength, CU2BYTES(clength)); data/pcre2-10.34/src/pcre2_convert.c:246:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, posix, CU2BYTES(6)); data/pcre2-10.34/src/pcre2_convert.c:347:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, posix - clength, CU2BYTES(clength)); data/pcre2-10.34/src/pcre2_dfa_match.c:664: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(new_states, active_states, (size_t)new_count * sizeof(stateblock)); data/pcre2-10.34/src/pcre2_dfa_match.c:3918: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((void *)match_data->subject, subject, length); data/pcre2-10.34/src/pcre2_fuzzsupport.c:211: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. unsigned char buffer[256]; data/pcre2-10.34/src/pcre2_fuzzsupport.c:248: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. unsigned char buffer[256]; data/pcre2-10.34/src/pcre2_fuzzsupport.c:265: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. unsigned char buffer[256]; data/pcre2-10.34/src/pcre2_fuzzsupport.c:318: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(buffer, argv[i]+1, readsize); data/pcre2-10.34/src/pcre2_fuzzsupport.c:327:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(argv[i], "rb"); data/pcre2-10.34/src/pcre2_internal.h:177:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define memcpy(d,s,n) _memcpy(d,s,n) data/pcre2-10.34/src/pcre2_intmodedep.h:838: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. typedef char check_heapframe_size[ data/pcre2-10.34/src/pcre2_jit_test.c:1824: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 *pattern[2]; data/pcre2-10.34/src/pcre2_match.c:651: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(new, mb->match_frames, mb->frame_vector_size); data/pcre2-10.34/src/pcre2_match.c:698:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)N + offsetof(heapframe, eptr), data/pcre2-10.34/src/pcre2_match.c:855:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ovector + 2, Fovector, (i - 2) * sizeof(PCRE2_SIZE)); data/pcre2-10.34/src/pcre2_match.c:5143:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Fovector, data/pcre2-10.34/src/pcre2_match.c:5334:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(Fovector, data/pcre2-10.34/src/pcre2_match.c:5487:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)P + offsetof(heapframe, ovector), Fovector, data/pcre2-10.34/src/pcre2_match.c:5572:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((char *)F + offsetof(heapframe, ovector), P->ovector, data/pcre2-10.34/src/pcre2_match.c:5598: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((char *)P + offsetof(heapframe, eptr), data/pcre2-10.34/src/pcre2_match.c:6280: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((void *)match_data->subject, subject, length); data/pcre2-10.34/src/pcre2_match.c:7181:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((void *)match_data->subject, subject, length); data/pcre2-10.34/src/pcre2_serialize.c:113:1: [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(bytes, memctl, sizeof(pcre2_memctl)); data/pcre2-10.34/src/pcre2_serialize.c:124:1: [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(dst_bytes, tables, tables_length); data/pcre2-10.34/src/pcre2_serialize.c:130:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (void)memcpy(dst_bytes, (char *)re, re->blocksize); data/pcre2-10.34/src/pcre2_serialize.c:195:1: [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(tables, src_bytes, tables_length); data/pcre2-10.34/src/pcre2_serialize.c:208: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(&blocksize, src_bytes + offsetof(pcre2_real_code, blocksize), data/pcre2-10.34/src/pcre2_serialize.c:230:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(((uint8_t *)dst_re) + sizeof(pcre2_memctl), data/pcre2-10.34/src/pcre2_string_utils.c:66:1: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s, d, n); data/pcre2-10.34/src/pcre2_substitute.c:209:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer + buff_offset, from, CU2BYTES(length)); \ data/pcre2-10.34/src/pcre2_substring.c:129:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buffer, match_data->subject + match_data->ovector[stringnumber*2], data/pcre2-10.34/src/pcre2_substring.c:221:1: [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(yield, match_data->subject + match_data->ovector[stringnumber*2], data/pcre2-10.34/src/pcre2_substring.c:422:18: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if (size != 0) memcpy(sp, match_data->subject + ovector[i], CU2BYTES(size)); data/pcre2-10.34/src/pcre2grep.c:367: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 *incexname[4] = { "--include", "--exclude", data/pcre2-10.34/src/pcre2grep.c:509:1: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s, d, n); data/pcre2-10.34/src/pcre2grep.c:565: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 seq[16]; data/pcre2-10.34/src/pcre2grep.c:600:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char val_buf[4]; data/pcre2-10.34/src/pcre2grep.c:603: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(val_buf, "%d", rc); data/pcre2-10.34/src/pcre2grep.c:743:16: [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). int code = atoi(cs); data/pcre2-10.34/src/pcre2grep.c:954:1: [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(pattern, filename, len); data/pcre2-10.34/src/pcre2grep.c:958: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(&(pattern[len]), "\\*", 3); data/pcre2-10.34/src/pcre2grep.c:1189:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s[4]; data/pcre2-10.34/src/pcre2grep.c:1195:27: [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. if (op->one_char > 0) sprintf(s, "-%c,", op->one_char); data/pcre2-10.34/src/pcre2grep.c:1196:12: [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. else strcpy(s, " "); data/pcre2-10.34/src/pcre2grep.c:1757: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. unsigned char mbuffer[256]; data/pcre2-10.34/src/pcre2grep.c:2298:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(argsptr, subject + ovector[capture_id], capturesize); data/pcre2-10.34/src/pcre2grep.c:2327:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmdbuf[500]; data/pcre2-10.34/src/pcre2grep.c:2532: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(new_buffer, main_buffer, bufsize); data/pcre2-10.34/src/pcre2grep.c:3159:18: [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). zos_test_file = fopen(pathname,"rb"); data/pcre2-10.34/src/pcre2grep.c:3202:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[FNBUFSIZ]; data/pcre2-10.34/src/pcre2grep.c:3238:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/pcre2-10.34/src/pcre2grep.c:3254:5: [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(buffer, "%.512s%.128s", pathname, nextfile); data/pcre2-10.34/src/pcre2grep.c:3330: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). in = fopen(pathname, "rb"); data/pcre2-10.34/src/pcre2grep.c:3438: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. unsigned char buffer[128]; data/pcre2-10.34/src/pcre2grep.c:3464: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 buffer[14]; data/pcre2-10.34/src/pcre2grep.c:3466:1: [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(p, "%d", n); data/pcre2-10.34/src/pcre2grep.c:3472:11: [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. case 1: strcpy(p, "st"); break; data/pcre2-10.34/src/pcre2grep.c:3473:11: [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. case 2: strcpy(p, "nd"); break; data/pcre2-10.34/src/pcre2grep.c:3474:11: [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. case 3: strcpy(p, "rd"); break; data/pcre2-10.34/src/pcre2grep.c:3475:12: [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. default: strcpy(p, "th"); break; data/pcre2-10.34/src/pcre2grep.c:3593: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 buffer[MAXPATLEN+20]; data/pcre2-10.34/src/pcre2grep.c:3602:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(name, "r"); data/pcre2-10.34/src/pcre2grep.c:3764:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff1[24]; data/pcre2-10.34/src/pcre2grep.c:3765:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff2[24]; data/pcre2-10.34/src/pcre2grep.c:4326:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[FNBUFSIZ]; data/pcre2-10.34/src/pcre2grep.c:4330:10: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fl = fopen(fn->name, "rb"); data/pcre2-10.34/src/pcre2test.c:1038:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,8),G(b,8),sizeof(pcre2_convert_context_8)); \ data/pcre2-10.34/src/pcre2test.c:1040:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,16),G(b,16),sizeof(pcre2_convert_context_16)); \ data/pcre2-10.34/src/pcre2test.c:1041:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(G(a,32),G(b,32),sizeof(pcre2_convert_context_32)) data/pcre2-10.34/src/pcre2test.c:1045:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,8),(char *)b,c); \ data/pcre2-10.34/src/pcre2test.c:1047:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,16),(char *)b,(c)*2); \ data/pcre2-10.34/src/pcre2test.c:1049:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,32),(char *)b,(c)*4) data/pcre2-10.34/src/pcre2test.c:1053:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,8),G(b,8),sizeof(pcre2_match_context_8)); \ data/pcre2-10.34/src/pcre2test.c:1055:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,16),G(b,16),sizeof(pcre2_match_context_16)); \ data/pcre2-10.34/src/pcre2test.c:1056:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(G(a,32),G(b,32),sizeof(pcre2_match_context_32)) data/pcre2-10.34/src/pcre2test.c:1063:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,8),G(b,8),sizeof(pcre2_compile_context_8)); \ data/pcre2-10.34/src/pcre2test.c:1065:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,16),G(b,16),sizeof(pcre2_compile_context_16)); \ data/pcre2-10.34/src/pcre2test.c:1066:8: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. else memcpy(G(a,32),G(b,32),sizeof(pcre2_compile_context_32)) data/pcre2-10.34/src/pcre2test.c:1587:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_convert_context_,BITONE))); \ data/pcre2-10.34/src/pcre2test.c:1589:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_convert_context_,BITTWO))) data/pcre2-10.34/src/pcre2test.c:1593: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(G(a,BITONE),(char *)b,(c)*BYTEONE) : \ data/pcre2-10.34/src/pcre2test.c:1594: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(G(a,BITTWO),(char *)b,(c)*BYTETWO) data/pcre2-10.34/src/pcre2test.c:1598:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_match_context_,BITONE))); \ data/pcre2-10.34/src/pcre2test.c:1600:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_match_context_,BITTWO))) data/pcre2-10.34/src/pcre2test.c:1607:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITONE),G(b,BITONE),sizeof(G(pcre2_compile_context_,BITONE))); \ data/pcre2-10.34/src/pcre2test.c:1609:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(G(a,BITTWO),G(b,BITTWO),sizeof(G(pcre2_compile_context_,BITTWO))) data/pcre2-10.34/src/pcre2test.c:2012:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_convert_context_8)) data/pcre2-10.34/src/pcre2test.c:2013:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONVERT_COPY(a,b,c) memcpy(G(a,8),(char *)b, c) data/pcre2-10.34/src/pcre2test.c:2014:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define DATCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_match_context_8)) data/pcre2-10.34/src/pcre2test.c:2016:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define PATCTXCPY(a,b) memcpy(G(a,8),G(b,8),sizeof(pcre2_compile_context_8)) data/pcre2-10.34/src/pcre2test.c:2119:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_convert_context_16)) data/pcre2-10.34/src/pcre2test.c:2120:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONVERT_COPY(a,b,c) memcpy(G(a,16),(char *)b, (c)*2) data/pcre2-10.34/src/pcre2test.c:2121:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define DATCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_match_context_16)) data/pcre2-10.34/src/pcre2test.c:2123:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define PATCTXCPY(a,b) memcpy(G(a,16),G(b,16),sizeof(pcre2_compile_context_16)) data/pcre2-10.34/src/pcre2test.c:2226:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_convert_context_32)) data/pcre2-10.34/src/pcre2test.c:2227:29: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define CONVERT_COPY(a,b,c) memcpy(G(a,32),(char *)b, (c)*4) data/pcre2-10.34/src/pcre2test.c:2228:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define DATCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_match_context_32)) data/pcre2-10.34/src/pcre2test.c:2230:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define PATCTXCPY(a,b) memcpy(G(a,32),G(b,32),sizeof(pcre2_compile_context_32)) data/pcre2-10.34/src/pcre2test.c:2673:1: [2] (buffer) bcopy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. bcopy(s, d, n); data/pcre2-10.34/src/pcre2test.c:2905: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 tempbuffer[16]; data/pcre2-10.34/src/pcre2test.c:2928:12: [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. else n = sprintf(tempbuffer, "\\x{%02x}", c); data/pcre2-10.34/src/pcre2test.c:3352:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_buffer, buffer, pbuffer8_size); data/pcre2-10.34/src/pcre2test.c:3353:1: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(new_pbuffer8, pbuffer8, pbuffer8_size); data/pcre2-10.34/src/pcre2test.c:3416: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(here, s, len); data/pcre2-10.34/src/pcre2test.c:3519:20: [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. int c = strncmp((char *)p, modlist[mid].name, (len < mlen)? len : mlen); data/pcre2-10.34/src/pcre2test.c:3964:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(nn, pp, len); data/pcre2-10.34/src/pcre2test.c:3979:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(field, pp, len); data/pcre2-10.34/src/pcre2test.c:4806:9: [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). *fptr = fopen((const char *)filename, mode); data/pcre2-10.34/src/pcre2test.c:5099:1: [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(&pat_patctl, &def_patctl, sizeof(patctl)); data/pcre2-10.34/src/pcre2test.c:5326: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(pt, pc, length); data/pcre2-10.34/src/pcre2test.c:5479: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(pbuffer8 + bsize, "DEADBEEF", 8); data/pcre2-10.34/src/pcre2test.c:6593:1: [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(&dat_datctl, &def_datctl, sizeof(datctl)); data/pcre2-10.34/src/pcre2test.c:6727: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(CAST8VAR(q), start_rep, replen); data/pcre2-10.34/src/pcre2test.c:8223:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ucname[16]; data/pcre2-10.34/src/pcre2test.c:8234:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char nam_buf[22], val_buf[4]; data/pcre2-10.34/src/pcre2test.c:8240:5: [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(val_buf, "%d", yield); data/pcre2-10.34/src/pcre2test.c:8923:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). infile = fopen(argv[op], INPUT_MODE); data/pcre2-10.34/src/pcre2test.c:8938:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). outfile = fopen(argv[op+1], OUTPUT_MODE); data/pcre2-10.34/src/sljit/sljitConfigInternal.h:214:38: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define SLJIT_MEMCPY(dest, src, len) memcpy(dest, src, len) data/pcre2-10.34/src/sljit/sljitExecAllocator.c:125:7: [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). if (atoi(name.release) >= 18) { data/pcre2-10.34/src/sljit/sljitNativeTILEGX-encoder.c:648:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char operands[TILEGX_NUM_PIPELINE_ENCODINGS][TILEGX_MAX_OPERANDS]; data/pcre2-10.34/src/sljit/sljitNativeTILEGX-encoder.c:10072:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char opbuf[TILEGX_BUNDLE_SIZE_IN_BYTES]; data/pcre2-10.34/src/sljit/sljitNativeTILEGX-encoder.c:10076: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((void *)opbuf, (void *)memaddr, TILEGX_BUNDLE_SIZE_IN_BYTES); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:106: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 tmp_name[256]; data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:119:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(tmp_name, "/tmp"); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:123: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(tmp_name, "/tmp"); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:144:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(tmp_name, O_TMPFILE | O_EXCL | O_RDWR | O_NOATIME | O_CLOEXEC, S_IRUSR | S_IWUSR); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:154: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(tmp_name + tmp_name_len, "/XXXXXX"); data/pcre2-10.34/src/sljit/sljitUtils.c:178:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dev_zero = open("/dev/zero", O_RDWR); data/pcre2-10.34/src/sljit/sljitUtils.c:193:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dev_zero = open("/dev/zero", O_RDWR); data/pcre2-10.34/src/pcre2_compile.c:9755:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). patlen = PRIV(strlen)(pattern); data/pcre2-10.34/src/pcre2_config.c:157:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v))); data/pcre2-10.34/src/pcre2_config.c:202:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v))); data/pcre2-10.34/src/pcre2_config.c:239:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(v) : PRIV(strcpy_c8)((PCRE2_UCHAR *)where, v))); data/pcre2-10.34/src/pcre2_convert.c:1078:54: [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 (plength == PCRE2_ZERO_TERMINATED) plength = PRIV(strlen)(pattern); data/pcre2-10.34/src/pcre2_dfa_match.c:3292:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = PRIV(strlen)(subject); data/pcre2-10.34/src/pcre2_fuzzsupport.c:309: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). readsize = strlen(argv[i]) - 1; data/pcre2-10.34/src/pcre2_internal.h:174:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define strlen(s) _strlen(s) data/pcre2-10.34/src/pcre2_jit_test.c:1358:71: [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_value8[1] = pcre2_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input), data/pcre2-10.34/src/pcre2_jit_test.c:1365:72: [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_value8[0] = pcre2_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input), data/pcre2-10.34/src/pcre2_jit_test.c:1369:76: [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_value8[0] = pcre2_jit_match_8(re8, (PCRE2_SPTR8)current->input, strlen(current->input), data/pcre2-10.34/src/pcre2_jit_test.c:2001:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = (PCRE2_SIZE)(strlen(current->input) - current->skip_left - current->skip_right); data/pcre2-10.34/src/pcre2_match.c:6102:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). length = PRIV(strlen)(subject); data/pcre2-10.34/src/pcre2_string_utils.c:209:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PRIV(strlen)(PCRE2_SPTR str) data/pcre2-10.34/src/pcre2_substitute.c:280:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (length == PCRE2_ZERO_TERMINATED) length = PRIV(strlen)(subject); data/pcre2-10.34/src/pcre2_substitute.c:281:54: [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 (rlength == PCRE2_ZERO_TERMINATED) rlength = PRIV(strlen)(replacement); data/pcre2-10.34/src/pcre2demo.c:130: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). subject_length = (PCRE2_SIZE)strlen((char *)subject); data/pcre2-10.34/src/pcre2grep.c:604:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sym_val.dsc$w_length = strlen(val_buf); data/pcre2-10.34/src/pcre2grep.c:946:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(filename); data/pcre2-10.34/src/pcre2grep.c:1235: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 plen = strlen((const char *)path); data/pcre2-10.34/src/pcre2grep.c:1296:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int nlen = (equals == NULL)? (int)strlen(op->long_name) : data/pcre2-10.34/src/pcre2grep.c:1375:13: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(f)) != EOF) data/pcre2-10.34/src/pcre2grep.c:2336:5: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(cmdbuf, " "); data/pcre2-10.34/src/pcre2grep.c:2339:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cmd.dsc$w_length = strlen(cmdbuf) - 1; data/pcre2-10.34/src/pcre2grep.c:2575: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). unsigned long newlen = length * jfriedl_XT + strlen(jfriedl_prefix) + strlen(jfriedl_postfix); data/pcre2-10.34/src/pcre2grep.c:2575:81: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned long newlen = length * jfriedl_XT + strlen(jfriedl_prefix) + strlen(jfriedl_postfix); data/pcre2-10.34/src/pcre2grep.c:2583:53: [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). strcpy(endptr, jfriedl_prefix); endptr += strlen(jfriedl_prefix); data/pcre2-10.34/src/pcre2grep.c:2585:19: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(endptr, orig, length); data/pcre2-10.34/src/pcre2grep.c:2588:54: [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). strcpy(endptr, jfriedl_postfix); endptr += strlen(jfriedl_postfix); data/pcre2-10.34/src/pcre2grep.c:3217:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int fnlength = strlen(pathname) + strlen(nextfile) + 2; data/pcre2-10.34/src/pcre2grep.c:3217: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). int fnlength = strlen(pathname) + strlen(nextfile) + 2; data/pcre2-10.34/src/pcre2grep.c:3289:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pathlen = (int)(strlen(pathname)); data/pcre2-10.34/src/pcre2grep.c:3746:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (int)strlen(arg) : (int)(argequals - arg); data/pcre2-10.34/src/pcre2grep.c:3771: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). (int)strlen(arg) : (int)(argequals - arg); data/pcre2-10.34/src/pcre2grep.c:3949:59: [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). *(pd->lastptr) = add_pattern(option_data, (PCRE2_SIZE)strlen(option_data), data/pcre2-10.34/src/pcre2grep.c:4129:40: [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 (strspn(cs, ";0123456789") == strlen(cs)) colour_string = cs; data/pcre2-10.34/src/pcre2grep.c:4240:63: [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). patterns = patterns_last = add_pattern(argv[i], (PCRE2_SIZE)strlen(argv[i]), data/pcre2-10.34/src/pcre2grep.c:4341:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char *end = buffer + (int)strlen(buffer); data/pcre2-10.34/src/pcre2posix.c:380:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). eo = (int)strlen(string); data/pcre2-10.34/src/pcre2test.c:1008:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define strlen8(x) strlen((char *)x) data/pcre2-10.34/src/pcre2test.c:1515:53: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define STRLEN(p) ((test_mode == PCRE8_MODE)? ((int)strlen((char *)p)) : \ data/pcre2-10.34/src/pcre2test.c:1977: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). G(strlen,BITONE)((G(PCRE2_SPTR,BITONE))p) : \ data/pcre2-10.34/src/pcre2test.c:1978: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). G(strlen,BITTWO)((G(PCRE2_SPTR,BITTWO))p)) data/pcre2-10.34/src/pcre2test.c:2106:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). #define STRLEN(p) (int)strlen((char *)p) data/pcre2-10.34/src/pcre2test.c:3413:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(s); data/pcre2-10.34/src/pcre2test.c:3432: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). dlen = strlen((char *)here); data/pcre2-10.34/src/pcre2test.c:3518:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int mlen = strlen(modlist[mid].name); data/pcre2-10.34/src/pcre2test.c:3724:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(c1modlist[i].fullname)); data/pcre2-10.34/src/pcre2test.c:3903:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len == strlen(newlines[i]) && data/pcre2-10.34/src/pcre2test.c:3957: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). while (*nn != 0) nn += strlen(nn) + 1; data/pcre2-10.34/src/pcre2test.c:4851: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). cmdlen = strlen(cmdname); data/pcre2-10.34/src/pcre2test.c:4908:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t nlen = strlen(newlines[i]); data/pcre2-10.34/src/pcre2test.c:5010:42: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). for (i = 0; i < 4; i++) serial_size |= fgetc(f) << (i*8); data/pcre2-10.34/src/pcre2test.c:5342:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy((char *)pbuffer8, (char *)(buffer+1), patlen + 1); data/pcre2-10.34/src/pcre2test.c:6357:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int namelen = strlen((const char *)nptr); data/pcre2-10.34/src/pcre2test.c:6438:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int namelen = strlen((const char *)nptr); data/pcre2-10.34/src/pcre2test.c:6615:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen((const char *)buffer); data/pcre2-10.34/src/pcre2test.c:7298: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). if (utf) badutf = valid_utf(pr, strlen((const char *)pr), &erroroffset); data/pcre2-10.34/src/pcre2test.c:8239:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nam.dsc$w_length = strlen(nam_buf); data/pcre2-10.34/src/pcre2test.c:8241:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). val.dsc$w_length = strlen(val_buf); data/pcre2-10.34/src/pcre2test.c:8402:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). uint32_t k = 27 - strlen(m->name); data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:112:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (P_tmpdir != NULL) ? strlen(P_tmpdir) : 0; data/pcre2-10.34/src/sljit/sljitProtExecAllocator.c:129:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(dir); ANALYSIS SUMMARY: Hits = 284 Lines analyzed = 113748 in approximately 3.44 seconds (33049 lines/second) Physical Source Lines of Code (SLOC) = 84751 Hits@level = [0] 1025 [1] 63 [2] 152 [3] 9 [4] 60 [5] 0 Hits@level+ = [0+] 1309 [1+] 284 [2+] 221 [3+] 69 [4+] 60 [5+] 0 Hits/KSLOC@level+ = [0+] 15.4452 [1+] 3.35099 [2+] 2.60764 [3+] 0.81415 [4+] 0.707956 [5+] 0 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.