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/fsvs-1.2.9/src/options.c Examining data/fsvs-1.2.9/src/add_unvers.c Examining data/fsvs-1.2.9/src/update.h Examining data/fsvs-1.2.9/src/log.h Examining data/fsvs-1.2.9/src/helper.h Examining data/fsvs-1.2.9/src/update.c Examining data/fsvs-1.2.9/src/sync.h Examining data/fsvs-1.2.9/src/log.c Examining data/fsvs-1.2.9/src/helper.c Examining data/fsvs-1.2.9/src/revert.h Examining data/fsvs-1.2.9/src/sync.c Examining data/fsvs-1.2.9/src/cat.h Examining data/fsvs-1.2.9/src/checkout.h Examining data/fsvs-1.2.9/src/hash_ops.h Examining data/fsvs-1.2.9/src/cache.h Examining data/fsvs-1.2.9/src/direnum.h Examining data/fsvs-1.2.9/src/revert.c Examining data/fsvs-1.2.9/src/url.h Examining data/fsvs-1.2.9/src/cat.c Examining data/fsvs-1.2.9/src/checkout.c Examining data/fsvs-1.2.9/src/hash_ops.c Examining data/fsvs-1.2.9/src/cache.c Examining data/fsvs-1.2.9/src/direnum.c Examining data/fsvs-1.2.9/src/url.c Examining data/fsvs-1.2.9/src/warnings.h Examining data/fsvs-1.2.9/src/warnings.c Examining data/fsvs-1.2.9/src/status.h Examining data/fsvs-1.2.9/src/racallback.h Examining data/fsvs-1.2.9/src/resolve.h Examining data/fsvs-1.2.9/src/status.c Examining data/fsvs-1.2.9/src/racallback.c Examining data/fsvs-1.2.9/src/resolve.c Examining data/fsvs-1.2.9/src/remote.h Examining data/fsvs-1.2.9/src/commit.h Examining data/fsvs-1.2.9/src/remote.c Examining data/fsvs-1.2.9/src/ignore.h Examining data/fsvs-1.2.9/src/commit.c Examining data/fsvs-1.2.9/src/ignore.c Examining data/fsvs-1.2.9/src/preproc.h Examining data/fsvs-1.2.9/src/ac_list.c Examining data/fsvs-1.2.9/src/diff.h Examining data/fsvs-1.2.9/src/waa.h Examining data/fsvs-1.2.9/src/waa.c Examining data/fsvs-1.2.9/src/diff.c Examining data/fsvs-1.2.9/src/checksum.h Examining data/fsvs-1.2.9/src/global.h Examining data/fsvs-1.2.9/src/checksum.c Examining data/fsvs-1.2.9/src/info.h Examining data/fsvs-1.2.9/src/info.c Examining data/fsvs-1.2.9/src/export.h Examining data/fsvs-1.2.9/src/export.c Examining data/fsvs-1.2.9/src/est_ops.h Examining data/fsvs-1.2.9/src/tools/fsvs-chrooter.c Examining data/fsvs-1.2.9/src/est_ops.c Examining data/fsvs-1.2.9/src/cp_mv.h Examining data/fsvs-1.2.9/src/props.h Examining data/fsvs-1.2.9/src/interface.h Examining data/fsvs-1.2.9/src/actions.h Examining data/fsvs-1.2.9/src/build.h Examining data/fsvs-1.2.9/src/cp_mv.c Examining data/fsvs-1.2.9/src/options.h Examining data/fsvs-1.2.9/src/actions.c Examining data/fsvs-1.2.9/src/build.c Examining data/fsvs-1.2.9/src/add_unvers.h Examining data/fsvs-1.2.9/src/fsvs.c Examining data/fsvs-1.2.9/src/props.c FINAL RESULTS: data/fsvs-1.2.9/src/est_ops.c:163:19: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. STOPIF_CODE_ERR( readlink(filename, cp+hlen, sts->st.size) == -1, data/fsvs-1.2.9/src/interface.h:141:20: [5] (race) chown: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchown( ) instead. #define CHOWN_FUNC chown data/fsvs-1.2.9/src/update.c:609:11: [5] (race) chmod: This accepts filename arguments; if an attacker can move those files, a race condition results. (CWE-362). Use fchmod( ) instead. status=chmod(filename, sts->st.mode & 07777); data/fsvs-1.2.9/src/build.c:109: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(eos, list[i]); data/fsvs-1.2.9/src/checksum.c:742:5: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. i=sprintf(buffer, cs___mb_wr_format, data/fsvs-1.2.9/src/checksum.c:1055:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. i=sscanf(buffer, cs___mb_rd_format, data/fsvs-1.2.9/src/commit.c:685: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, missing_path_utf8); data/fsvs-1.2.9/src/commit.c:687: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 + missing_path_utf8_len +1, utf8_filename); data/fsvs-1.2.9/src/commit.c:977:4: [4] (shell) system: 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. l=system(cp); data/fsvs-1.2.9/src/cp_mv.c:1660:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( *eobuffer +1, cur->name ); data/fsvs-1.2.9/src/diff.c:121:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. l1=vsnprintf(buf_old, META_DIFF_MAXLEN-1, format, va); data/fsvs-1.2.9/src/diff.c:131:5: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. l2=vsnprintf(buf_new, META_DIFF_MAXLEN-1, format, va); data/fsvs-1.2.9/src/diff.c:140:4: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf( data/fsvs-1.2.9/src/diff.c:338:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b1, "%s \tRev. %llu \t(%-24.24s)", data/fsvs-1.2.9/src/diff.c:343:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b2, "%s \tLocal version \t(%-24.24s)", data/fsvs-1.2.9/src/diff.c:349:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b2, "%s \tRev. %llu \t(%-24.24s)", data/fsvs-1.2.9/src/diff.c:391:3: [4] (shell) execlp: 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. execlp( opt__get_string(OPT__DIFF_PRG), data/fsvs-1.2.9/src/diff.c:661:3: [4] (shell) execlp: 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. execlp( program, program, NULL); data/fsvs-1.2.9/src/direnum.c:176:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( dirp[0].d_name, de->d_name); data/fsvs-1.2.9/src/direnum.c:483: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(strings+mark, p_de->d_name); data/fsvs-1.2.9/src/est_ops.c:162:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cp, link_spec); data/fsvs-1.2.9/src/est_ops.c:186:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer, "%s%c0x%x:0x%x", data/fsvs-1.2.9/src/est_ops.c:541:6: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. len=sprintf(buffer, ops__dir_info_format_p, data/fsvs-1.2.9/src/fsvs.c:388:8: [4] (shell) popen: 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. tmp=popen(fn+1, "w"); data/fsvs-1.2.9/src/fsvs.c:530:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(debug_out, format, va); data/fsvs-1.2.9/src/fsvs.c:585:4: [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(stop_out, format, va); data/fsvs-1.2.9/src/fsvs.c:618:3: [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(stop_out, format, va); data/fsvs-1.2.9/src/fsvs.c:906:3: [4] (shell) execlp: 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. execlp("gdb", "gdb", program_name, ppid_str, NULL); data/fsvs-1.2.9/src/global.h:647:26: [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. __attribute__ ((format (printf, 4, 5) )); data/fsvs-1.2.9/src/global.h:686:25: [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. __attribute__ ((format (printf, 5, 6) )); data/fsvs-1.2.9/src/hash_ops.c:209:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(eos, name); data/fsvs-1.2.9/src/helper.c:495: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(dest, start_path); data/fsvs-1.2.9/src/helper.c:1261:4: [4] (shell) system: 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. i=system(command); data/fsvs-1.2.9/src/helper.c:1405:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename, so_pre); data/fsvs-1.2.9/src/helper.c:1422: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(filename+strlen(so_pre), libs); data/fsvs-1.2.9/src/helper.c:1423: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(filename+strlen(so_pre)+len, so_post); data/fsvs-1.2.9/src/ignore.c:1354:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. status=sscanf(memory, ign_header_str, data/fsvs-1.2.9/src/ignore.c:1568:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(eos, "%s%n", input, &gn_len) != 1) goto invalid; data/fsvs-1.2.9/src/ignore.c:1793: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. status=snprintf(buffer, sizeof(buffer)-1, data/fsvs-1.2.9/src/options.c:432:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, string); data/fsvs-1.2.9/src/options.c:607:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(fn, path); data/fsvs-1.2.9/src/options.c:611: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(fn, name); data/fsvs-1.2.9/src/props.c:880:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(eos, WAA__PROP_EXT); data/fsvs-1.2.9/src/racallback.c:341: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(copy, utf8_name); data/fsvs-1.2.9/src/revert.c:626:20: [4] (shell) execlp: 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. STOPIF_CODE_ERR( execlp( opt__get_string(OPT__MERGE_PRG), data/fsvs-1.2.9/src/status.c:284:23: [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. STOPIF_CODE_EPIPE( fprintf(output, data/fsvs-1.2.9/src/status.c:634: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(string + last_len, sep); data/fsvs-1.2.9/src/status.c:638: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(string + last_len, data[i].string); data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:182: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(stderr, __VA_ARGS__); \ data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:233:2: [4] (shell) execvp: 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. execvp("fsvs",args); data/fsvs-1.2.9/src/update.c:893:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(filename_tmp, filename); data/fsvs-1.2.9/src/url.c:1169:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buffer, current_url->url + 1 + (cp - buffer)); data/fsvs-1.2.9/src/url.c:1373: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( data, url->url); data/fsvs-1.2.9/src/url.c:1385: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( data+url->urllen+1, path); data/fsvs-1.2.9/src/waa.c:135: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(dest, opt__get_string(OPT__SOFTROOT)); data/fsvs-1.2.9/src/waa.c:142:14: [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). l+= strlen( strcpy(dest+l, opt__get_string(which) ) ); data/fsvs-1.2.9/src/waa.c:239:20: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. STOPIF_CODE_ERR( access(conf_tmp_path, data/fsvs-1.2.9/src/waa.c:600:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(eos, extension); data/fsvs-1.2.9/src/waa.c:610: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(eos, ext_tmp); data/fsvs-1.2.9/src/waa.c:840: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(eos, extension); data/fsvs-1.2.9/src/waa.c:1376: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. status=snprintf(header, sizeof(header), waa__header_line, data/fsvs-1.2.9/src/waa.c:1668:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. status=sscanf(header, waa__header_line, data/fsvs-1.2.9/src/waa.c:1748: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(strings, filename); data/fsvs-1.2.9/src/waa.c:2984: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( filename + len, to_prepend); data/fsvs-1.2.9/src/waa.c:2988:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy( filename + len, to_append); data/fsvs-1.2.9/src/warnings.c:193:9: [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. ret|=vfprintf(warn_out, format, va); data/fsvs-1.2.9/src/warnings.h:107:26: [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. __attribute__ ((format (printf, 3, 4) )); data/fsvs-1.2.9/src/commit.c:968:13: [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. editor_cmd=getenv("EDITOR"); data/fsvs-1.2.9/src/commit.c:969:30: [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 (!editor_cmd) editor_cmd=getenv("VISUAL"); data/fsvs-1.2.9/src/fsvs.c:1077:6: [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. cmd=getenv(FSVS_DEBUG_ENV); data/fsvs-1.2.9/src/fsvs.c:1167:10: [3] (buffer) getopt: 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. status=getopt(argc, args, "+a:VhdvCm:F:D:qf:r:W:NRo:u:?"); data/fsvs-1.2.9/src/helper.c:1380:7: [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. libs=getenv(CHROOTER_LIBS_ENV); data/fsvs-1.2.9/src/helper.c:1383:7: [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. root=getenv(CHROOTER_ROOT_ENV); data/fsvs-1.2.9/src/helper.c:1386:6: [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. cwd=getenv(CHROOTER_CWD_ENV); data/fsvs-1.2.9/src/helper.c:1454:19: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. STOPIF_CODE_ERR( chroot(".") == -1, errno, data/fsvs-1.2.9/src/options.c:492:31: [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 (string[0] == '$') string=getenv(string+1); data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:220:7: [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 ( getenv(CHROOTER_LIBS_ENV) == NULL) data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:227:6: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chroot(CHROOTER_JAIL)==-1) data/fsvs-1.2.9/src/waa.c:2360:11: [3] (buffer) realpath: This function does not protect against buffer overflows, and some implementations can overflow internally (CWE-120/CWE-785!). Ensure that the destination buffer is at least of size MAXPATHLEN, andto protect against implementation problems, the input argument should also be checked to ensure it is no larger than MAXPATHLEN. status=realpath(args[i], canon) ? 0 : errno; data/fsvs-1.2.9/src/cache.c:86:12: [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 (data) memcpy(ce->data, data, len); data/fsvs-1.2.9/src/cache.h:38: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 data[1]; data/fsvs-1.2.9/src/checksum.c:73:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char backtrack[CS__MANBER_BACKTRACK]; data/fsvs-1.2.9/src/checksum.c:128:22: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const signed char values[256]={ data/fsvs-1.2.9/src/checksum.c:218:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(dest, data/fsvs-1.2.9/src/checksum.c:235: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(cur+i*2, "%02x", md5[i]); data/fsvs-1.2.9/src/checksum.c:253: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 stg[4][APR_MD5_DIGESTSIZE*2+1] = { { 0 } }; data/fsvs-1.2.9/src/checksum.c:371:6: [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). fh=open(fullpath, O_RDONLY); data/fsvs-1.2.9/src/checksum.c:694:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MANBER_LINELEN+10]; data/fsvs-1.2.9/src/checksum.c:995:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MANBER_LINELEN+10], *cp; data/fsvs-1.2.9/src/commit.c:1105:16: [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). commitmsg_fh=open(opt_commitmsgfile, O_RDONLY); data/fsvs-1.2.9/src/cp_mv.c:370:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[8]; data/fsvs-1.2.9/src/cp_mv.c:389: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[8]; data/fsvs-1.2.9/src/cp_mv.c:649: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 buffer[16]; data/fsvs-1.2.9/src/cp_mv.c:657:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buffer, "=%d.%1d%%", data/fsvs-1.2.9/src/diff.c:113:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf_old[META_DIFF_MAXLEN], data/fsvs-1.2.9/src/diff.c:177:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char short_desc[10]; data/fsvs-1.2.9/src/diff.c:345:4: [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(short_desc, "local"); data/fsvs-1.2.9/src/diff.c:351:4: [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(short_desc, "r%llu", (t_ull) rev2); data/fsvs-1.2.9/src/diff.c:891: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 *norm_wcroot[2]= {".", NULL}; data/fsvs-1.2.9/src/direnum.c:88:6: [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). *dh=open(path, O_RDONLY | O_DIRECTORY); data/fsvs-1.2.9/src/direnum.c:146: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 d_name[NAME_MAX+1]; data/fsvs-1.2.9/src/direnum.c:308: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(sts->by_name, sts->by_inode, count*sizeof(*sts->by_name)); data/fsvs-1.2.9/src/direnum.c:390:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[FREE_SPACE]; data/fsvs-1.2.9/src/est_ops.c:176: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 buffer[64]; data/fsvs-1.2.9/src/est_ops.c:496: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 buffer[WAA_MAX_DIR_INFO_CHARS+2] = data/fsvs-1.2.9/src/est_ops.c:645: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(path+i, sts->name, l); data/fsvs-1.2.9/src/est_ops.c:770: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(dir->by_inode+dir->entry_count, data/fsvs-1.2.9/src/est_ops.c:1816: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(copy, sts, sizeof(*copy)); data/fsvs-1.2.9/src/fsvs.c:390: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). tmp=fopen(fn, "w"); data/fsvs-1.2.9/src/fsvs.c:562: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 errormsg[256]; data/fsvs-1.2.9/src/fsvs.c:873: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 ppid_str[20]; data/fsvs-1.2.9/src/fsvs.c:905: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(ppid_str, "%d", pid); data/fsvs-1.2.9/src/fsvs.c:936: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 *charp_array_1[10]; data/fsvs-1.2.9/src/fsvs.c:937: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 *charp_array_2[10]; data/fsvs-1.2.9/src/fsvs.c:939: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 buffer[1024]; data/fsvs-1.2.9/src/fsvs.c:1079: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). debuglevel = atoi(cmd); data/fsvs-1.2.9/src/fsvs.c:1382: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(conf_tmp_fn, "config"); data/fsvs-1.2.9/src/global.h:53: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. typedef unsigned char md5_digest_t[APR_MD5_DIGESTSIZE]; data/fsvs-1.2.9/src/hash_ops.c:602: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, list->entries, c*sizeof(data[0])); data/fsvs-1.2.9/src/helper.c:835: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 to_encode[32]= { data/fsvs-1.2.9/src/helper.c:1190: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(encoder->output_md5, md5, sizeof(*encoder->output_md5)); data/fsvs-1.2.9/src/helper.c:1377: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[128]; data/fsvs-1.2.9/src/helper.c:1448:5: [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). fd=atoi(root); data/fsvs-1.2.9/src/helper.c:1458:5: [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). fd=atoi(cwd); data/fsvs-1.2.9/src/helper.c:1557: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(sts->arg+1, *env, len); data/fsvs-1.2.9/src/helper.c:1582: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 ps[2]= { PATH_SEPARATOR, 0}; data/fsvs-1.2.9/src/helper.c:1637: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(path, parent_with_arg->arg, len); data/fsvs-1.2.9/src/helper.c:1649: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(path+len, data/fsvs-1.2.9/src/helper.c:1712:6: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path+1, match, len); data/fsvs-1.2.9/src/helper.c:1746: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 buffers[2][(int)(sizeof(rev)*4)+3]; data/fsvs-1.2.9/src/helper.c:1752: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(buffers[last], "HEAD"); data/fsvs-1.2.9/src/helper.c:1756: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(buffers[last], "%llu", (t_ull)rev); data/fsvs-1.2.9/src/helper.c:1812:52: [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 hlp__stream_md5(svn_stream_t *stream, unsigned char md5[APR_MD5_DIGESTSIZE]) data/fsvs-1.2.9/src/helper.c:1971: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(*dest, source, len); data/fsvs-1.2.9/src/helper.h:127:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[ENCODE_BLOCKSIZE]; data/fsvs-1.2.9/src/helper.h:168: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 md5[APR_MD5_DIGESTSIZE]); data/fsvs-1.2.9/src/ignore.c:1502: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). g_in=fopen(copy, "rt"); data/fsvs-1.2.9/src/ignore.c:1519: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). g_in=fopen(copy, "rt"); data/fsvs-1.2.9/src/ignore.c:1772:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[HEADER_LEN]; data/fsvs-1.2.9/src/ignore.c:2047: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 *arg[2]; data/fsvs-1.2.9/src/options.c:427:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[strlen(string)+1]; data/fsvs-1.2.9/src/options.c:601: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 fn[strlen(path) + 1 + (name ? strlen(name) : 0) + 1]; data/fsvs-1.2.9/src/options.c:616: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). fp=fopen(fn, "rt"); data/fsvs-1.2.9/src/options.c:663:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32]; data/fsvs-1.2.9/src/options.c:706: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 path[strlen(string)+1]; data/fsvs-1.2.9/src/options.c:746: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 buffer[ sizeof(ENV_PREFIX) + data/fsvs-1.2.9/src/options.h:181:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[24]; data/fsvs-1.2.9/src/props.c:785: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 indent[5]=" "; data/fsvs-1.2.9/src/revert.c:196:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char target_rev[10]; data/fsvs-1.2.9/src/revert.c:615: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). hdl=open(output, O_WRONLY | O_CREAT, 0700); data/fsvs-1.2.9/src/revert.c:1137: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 revnum[12]; data/fsvs-1.2.9/src/status.c:115:10: [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[20]; data/fsvs-1.2.9/src/status.c:129:7: [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, "%llu", (t_ull) sts->st.size); data/fsvs-1.2.9/src/status.c:140: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. static char buffer[4]; data/fsvs-1.2.9/src/status.c:455: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 bar_chart[BAR_CHART_WIDTH+1]="###################>"; data/fsvs-1.2.9/src/status.c:562: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 buff[max_progress_len+3]; data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:193: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 stg[10]; data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:199:6: [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). hdl=open(fn, O_RDONLY); data/fsvs-1.2.9/src/tools/fsvs-chrooter.c:211:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(stg,"%d",hdl); data/fsvs-1.2.9/src/update.c:894:2: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(filename_tmp, ".up.tmp"); data/fsvs-1.2.9/src/url.c:979:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/fsvs-1.2.9/src/waa.c:381:30: [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 waa___get_path_md5(const char * path, data/fsvs-1.2.9/src/waa.c:382: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 digest[APR_MD5_DIGESTSIZE]) data/fsvs-1.2.9/src/waa.c:462: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 digest[APR_MD5_DIGESTSIZE], *p2dig; data/fsvs-1.2.9/src/waa.c:641:5: [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). fh=open(dest, flags, 0777); data/fsvs-1.2.9/src/waa.c:1040: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 tmp[count*(18+1)+10]; data/fsvs-1.2.9/src/waa.c:1044:9: [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. n += sprintf(tmp+n,"%llu ", (t_ull)(*array[i])->st.ino); data/fsvs-1.2.9/src/waa.c:1208: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 header[HEADER_LEN] = "UNFINISHED"; data/fsvs-1.2.9/src/waa.c:1512:10: [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). dir_hdl=open(".", O_RDONLY | O_DIRECTORY); data/fsvs-1.2.9/src/waa.c:1617: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 header[HEADER_LEN]; data/fsvs-1.2.9/src/waa.c:1666: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(header, dir_mmap, HEADER_LEN-2); data/fsvs-1.2.9/src/waa.c:2287: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 *paths[argc], *base_copy; data/fsvs-1.2.9/src/waa.c:2289: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 *nullp[2]; data/fsvs-1.2.9/src/waa.c:2294: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 canon[PATH_MAX]; data/fsvs-1.2.9/src/warnings.c:25: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 *wa__warn_action_text[_WA__LAST_INDEX] = data/fsvs-1.2.9/src/warnings.h:44: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 text[24]; data/fsvs-1.2.9/src/actions.c:79: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). len=strlen(cmd); data/fsvs-1.2.9/src/actions.c:94: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). if (len == strlen(*cp)) goto done; data/fsvs-1.2.9/src/cache.c:59:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (len == -1) len=strlen(data); data/fsvs-1.2.9/src/cache.c:281: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). STOPIF( cch__add(cache, id, key, strlen(key), NULL), NULL); data/fsvs-1.2.9/src/checksum.c:473:25: [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). apr_md5(sts->md5, cp, strlen(cp)); data/fsvs-1.2.9/src/checksum.c:1035:5: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). i=read(fh, buffer, sizeof(buffer)-1); data/fsvs-1.2.9/src/commit.c:681:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). utf8fn_len=strlen(utf8_filename); data/fsvs-1.2.9/src/commit.c:972:4: [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). l=strlen(editor_cmd) + 1 + strlen(opt_commitmsgfile) + 1; data/fsvs-1.2.9/src/commit.c:972: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). l=strlen(editor_cmd) + 1 + strlen(opt_commitmsgfile) + 1; data/fsvs-1.2.9/src/commit.c:1230:25: [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). missing_path_utf8_len=strlen(missing_dirs); data/fsvs-1.2.9/src/cp_mv.c:457:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d.dsize=strlen(d.dptr)+1; data/fsvs-1.2.9/src/cp_mv.c:1048: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). buflen=10 + 1 + strlen(url) + 1; data/fsvs-1.2.9/src/cp_mv.c:1072: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). start_path_len + 1 + strlen(path) + 1, &cp), NULL); data/fsvs-1.2.9/src/cp_mv.c:1577: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). key.dsize=strlen(name)+1; data/fsvs-1.2.9/src/cp_mv.c:1597:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). status=strlen(url); data/fsvs-1.2.9/src/cp_mv.c:1633: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). len=strlen(cur->name); data/fsvs-1.2.9/src/cp_mv.c:1645: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). *eobuffer=*dest_buffer+strlen(*dest_buffer); data/fsvs-1.2.9/src/diff.c:310: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_d=strlen(disp_dest); data/fsvs-1.2.9/src/diff.c:311: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_s=strlen(disp_source); data/fsvs-1.2.9/src/diff.c:496:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). wr_len=exp_len=strlen(special_stg); data/fsvs-1.2.9/src/diff.c:590:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ( (status=read(STDIN_FILENO,tmp, tmp_size)) > 0 ) data/fsvs-1.2.9/src/diff.c:692:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). status=read(success[0], &fdflags, sizeof(fdflags)); data/fsvs-1.2.9/src/direnum.c:179:3: [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(dirp[0].d_name) + 1; data/fsvs-1.2.9/src/direnum.c:482: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). l=strlen(p_de->d_name); data/fsvs-1.2.9/src/est_ops.c:91: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). if (0 == strncmp(data, link_spec, strlen(link_spec))) data/fsvs-1.2.9/src/est_ops.c:99:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (0 == strncmp(data, cdev_spec, strlen(cdev_spec))) data/fsvs-1.2.9/src/est_ops.c:101:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data+=strlen(cdev_spec); data/fsvs-1.2.9/src/est_ops.c:104: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). else if (0 == strncmp(data, bdev_spec, strlen(bdev_spec))) data/fsvs-1.2.9/src/est_ops.c:106:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data+=strlen(bdev_spec); data/fsvs-1.2.9/src/est_ops.c:158: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). hlen=strlen(link_spec); data/fsvs-1.2.9/src/est_ops.c:444:25: [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). *mem_pos = *filename + strlen(*filename) + 1; data/fsvs-1.2.9/src/est_ops.c:675:25: [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). sts->path_len = plen + strlen(sts->name); data/fsvs-1.2.9/src/fsvs.c:467: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). strncmp(opt_debugprefix, func, strlen(opt_debugprefix))) data/fsvs-1.2.9/src/fsvs.c:785:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(action_list[i].name[0]); data/fsvs-1.2.9/src/fsvs.c:918:3: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(pipes[0], &pid, 1); data/fsvs-1.2.9/src/hash_ops.c:461: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). key.dsize=strlen(key.dptr)+1; data/fsvs-1.2.9/src/hash_ops.c:462: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). value.dsize=strlen(value.dptr)+1; data/fsvs-1.2.9/src/helper.c:110:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). srclen_rem = len == -1 ? strlen(from)+1 : len; data/fsvs-1.2.9/src/helper.c:212: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(input)+1; data/fsvs-1.2.9/src/helper.c:603:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncasecmp(stg, head, strlen(head)) == 0) data/fsvs-1.2.9/src/helper.c:606: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). end=stg+strlen(head); data/fsvs-1.2.9/src/helper.c:798: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). i=strlen(start)-1; data/fsvs-1.2.9/src/helper.c:1416: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(libs); data/fsvs-1.2.9/src/helper.c:1418: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(so_pre) + strlen(so_post) +2)) data/fsvs-1.2.9/src/helper.c:1418: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). (len + strlen(so_pre) + strlen(so_post) +2)) data/fsvs-1.2.9/src/helper.c:1422: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). strcpy(filename+strlen(so_pre), libs); data/fsvs-1.2.9/src/helper.c:1423: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). strcpy(filename+strlen(so_pre)+len, so_post); data/fsvs-1.2.9/src/helper.c:1496:4: [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). x=strlen(cp); data/fsvs-1.2.9/src/helper.c:1611: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(parent_with_arg->arg); data/fsvs-1.2.9/src/helper.c:1802: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). if (strncmp(name, prop_pre_toignore, strlen(prop_pre_toignore)) == 0 || data/fsvs-1.2.9/src/helper.c:1803:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strncmp(name, prop_pre_toignore2, strlen(prop_pre_toignore2)) == 0) data/fsvs-1.2.9/src/helper.c:1857: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(25000); data/fsvs-1.2.9/src/helper.c:1935:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). opt__get_int(OPT__CONF_PATH)+strlen(DEFAULT_CONFIGDIR_SUB)+1 : data/fsvs-1.2.9/src/helper.h:191:25: [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 hlp__strnalloc(strlen(src), dest, src); } data/fsvs-1.2.9/src/ignore.c:758: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(ignore->compare_string)*5+16; data/fsvs-1.2.9/src/ignore.c:783: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). else if (strncmp(src, wildcard_prefix, strlen(wildcard_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:806:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dest, norm_prefix, strlen(norm_prefix)); data/fsvs-1.2.9/src/ignore.c:806: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). strncpy(dest, norm_prefix, strlen(norm_prefix)); data/fsvs-1.2.9/src/ignore.c:807:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dest+=strlen(norm_prefix); data/fsvs-1.2.9/src/ignore.c:984: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). pattern_len=strlen(pattern); data/fsvs-1.2.9/src/ignore.c:1040:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!eo_parm) eo_parm=eo_word+strlen(eo_word); data/fsvs-1.2.9/src/ignore.c:1119: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). else if (strncmp(dev_prefix, pattern, strlen(dev_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:1124: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). pattern+=strlen(dev_prefix); data/fsvs-1.2.9/src/ignore.c:1180: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). else if (strncmp(inode_prefix, pattern, strlen(inode_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:1189: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). pattern+=strlen(inode_prefix); data/fsvs-1.2.9/src/ignore.c:1214:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(pattern, norm_prefix, strlen(norm_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:1220:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strncmp(pattern, abs_shell_prefix, strlen(abs_shell_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:1225: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). else if (strncmp(pcre_prefix, pattern, strlen(pcre_prefix)) == 0) data/fsvs-1.2.9/src/ignore.c:1228: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). pattern += strlen(pcre_prefix); data/fsvs-1.2.9/src/ignore.c:1237: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). STOPIF_CODE_ERR( strlen(pattern)<3, EINVAL, data/fsvs-1.2.9/src/ignore.c:1280:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(eo_word) + strlen(ign__group_ign) + 1 + data/fsvs-1.2.9/src/ignore.c:1280: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). strlen(eo_word) + strlen(ign__group_ign) + 1 + data/fsvs-1.2.9/src/ignore.c:1370: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). cp+=strlen(cp)+1; data/fsvs-1.2.9/src/ignore.c:1428: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). gn_len=strlen(ign->group_name); data/fsvs-1.2.9/src/ignore.c:1475: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). gn_len=strlen(ign->group_name); data/fsvs-1.2.9/src/ignore.c:1497: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). strlen(CONFIGDIR_GROUP) + 1 + gn_len + 1, ©, data/fsvs-1.2.9/src/ignore.c:1516: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). strlen(CONFIGDIR_GROUP) + 1 + gn_len + 1); /* ==strlen(eos)+1 */ data/fsvs-1.2.9/src/ignore.c:1581: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). gn_len=strlen(input); data/fsvs-1.2.9/src/ignore.c:1671: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). len=strlen(cp); data/fsvs-1.2.9/src/ignore.c:1799:2: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buffer, "\n"); data/fsvs-1.2.9/src/ignore.c:1800:4: [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). l=strlen(buffer); data/fsvs-1.2.9/src/ignore.c:1811: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). l=strlen(ign->pattern)+1; data/fsvs-1.2.9/src/log.c:133: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). len = ccp+strlen(message) - message; data/fsvs-1.2.9/src/log.c:186:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(path_to_store) + 1 + 3, data/fsvs-1.2.9/src/log.c:219: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). len=strlen(message); data/fsvs-1.2.9/src/log.c:312: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). log___path_parm_len=strlen(argv[0]); data/fsvs-1.2.9/src/log.c:373:46: [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). log___path_prefix_len=current_url->urllen - strlen(base_url) + strlen(path)-1; data/fsvs-1.2.9/src/log.c:373:65: [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). log___path_prefix_len=current_url->urllen - strlen(base_url) + strlen(path)-1; data/fsvs-1.2.9/src/log.c:376: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). current_url->url + strlen(base_url), data/fsvs-1.2.9/src/options.c:427: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). char buffer[strlen(string)+1]; data/fsvs-1.2.9/src/options.c:475: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). ent->i_val=strlen(string); data/fsvs-1.2.9/src/options.c:566: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). klen=strlen(key); data/fsvs-1.2.9/src/options.c:601:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char fn[strlen(path) + 1 + (name ? strlen(name) : 0) + 1]; data/fsvs-1.2.9/src/options.c:601:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char fn[strlen(path) + 1 + (name ? strlen(name) : 0) + 1]; data/fsvs-1.2.9/src/options.c:610:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(fn, "/"); data/fsvs-1.2.9/src/options.c:670:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(cur, ENV_PREFIX, strlen(ENV_PREFIX)) == 0) data/fsvs-1.2.9/src/options.c:673: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). cur += strlen(ENV_PREFIX); data/fsvs-1.2.9/src/options.c:706: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). char path[strlen(string)+1]; data/fsvs-1.2.9/src/options.c:748: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). char * const target=buffer+strlen(ENV_PREFIX); data/fsvs-1.2.9/src/props.c:391: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). key.dsize=strlen(name)+1; data/fsvs-1.2.9/src/props.c:399:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value.dsize= *data ? strlen(data)+1 : 0; data/fsvs-1.2.9/src/props.c:450: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). key.dsize=strlen(keycp)+1; data/fsvs-1.2.9/src/props.c:577: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). key.dsize=strlen(key.dptr)+1; data/fsvs-1.2.9/src/props.c:651: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). key.dsize=strlen(key.dptr)+1; data/fsvs-1.2.9/src/props.c:658:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value.dsize=strlen(prp___to_be_removed_value)+1; data/fsvs-1.2.9/src/props.c:663:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). value.dsize=strlen(value.dptr)+1; data/fsvs-1.2.9/src/racallback.c:340: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). copy=apr_palloc(u_p_pool, strlen(utf8_name)+1); data/fsvs-1.2.9/src/resolve.c:73: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/fsvs-1.2.9/src/resolve.c:157: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). to_remove += strlen(to_remove)+1; data/fsvs-1.2.9/src/status.c:590: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). #define BIT_INFO(v, s) { .val=v, .string=s, .str_len=strlen(s) } data/fsvs-1.2.9/src/status.c:624: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). (last_len ? strlen(sep) : 0); data/fsvs-1.2.9/src/status.c:635: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). last_len += strlen(sep); data/fsvs-1.2.9/src/sync.c:207:47: [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). STOPIF( hlp__utf82local(entry_text->data+strlen(link_spec), data/fsvs-1.2.9/src/sync.c:209: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). sts->st.size = strlen(link_local); data/fsvs-1.2.9/src/update.c:883: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). status=strlen(filename)+10; data/fsvs-1.2.9/src/url.c:839:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). status=read(fh, urllist_mem, st.st_size); data/fsvs-1.2.9/src/url.c:852: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). l += strlen(urllist_mem+l)+1; data/fsvs-1.2.9/src/url.c:879: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). l += strlen(urllist_mem+l); data/fsvs-1.2.9/src/url.c:1103: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). cp=buffer+strlen(buffer); data/fsvs-1.2.9/src/waa.c:142: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). l+= strlen( strcpy(dest+l, opt__get_string(which) ) ); data/fsvs-1.2.9/src/waa.c:178:47: [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). opt__set_int(OPT__CONF_PATH, PRIO_MUSTHAVE, strlen(DEFAULT_CONF_PATH)); data/fsvs-1.2.9/src/waa.c:199:47: [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). opt__set_int(OPT__WAA_PATH, PRIO_MUSTHAVE, strlen(DEFAULT_WAA_PATH)); data/fsvs-1.2.9/src/waa.c:216:25: [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). WAA__MAX_EXT_LENGTH + strlen(ext_tmp) + 1 +4; data/fsvs-1.2.9/src/waa.c:305: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). if (ret_len) *ret_len=strlen(path); data/fsvs-1.2.9/src/waa.c:392: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). plen=strlen(path); data/fsvs-1.2.9/src/waa.c:407: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). plen=strlen(path); data/fsvs-1.2.9/src/waa.c:429: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). plen=strlen(path); data/fsvs-1.2.9/src/waa.c:777: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). w(dest, strlen(dest)) || data/fsvs-1.2.9/src/waa.c:1216: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). status=strlen(header); data/fsvs-1.2.9/src/waa.c:1236: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). root->path_len=string_space=strlen(root->name); data/fsvs-1.2.9/src/waa.c:1314: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). this_len=strlen(sts->name)+1; data/fsvs-1.2.9/src/waa.c:1750: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). strings += strlen(filename)+1; data/fsvs-1.2.9/src/waa.c:2336:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fnlen=start_path_len+1+strlen(args[i])+1; data/fsvs-1.2.9/src/waa.c:2345:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fnlen=strlen(args[i])+1; data/fsvs-1.2.9/src/waa.c:2352:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fnlen=strlen(args[i])+1; data/fsvs-1.2.9/src/waa.c:2365:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fnlen=strlen(canon)+1+strlen(last_ps+1)+1; data/fsvs-1.2.9/src/waa.c:2365: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). fnlen=strlen(canon)+1+strlen(last_ps+1)+1; data/fsvs-1.2.9/src/waa.c:2388: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). len=strlen(paths[0]); data/fsvs-1.2.9/src/waa.c:2946: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). len= base_dir ? strlen(base_dir) : 0; data/fsvs-1.2.9/src/waa.c:2957: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(base_dir); data/fsvs-1.2.9/src/waa.c:2979:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len + 1 + strlen(to_prepend) + strlen(to_append) + 1 + 3, data/fsvs-1.2.9/src/waa.c:2979: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). len + 1 + strlen(to_prepend) + strlen(to_append) + 1 + 3, data/fsvs-1.2.9/src/waa.c:2985: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(to_prepend); data/fsvs-1.2.9/src/waa.c:3012: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). wc_path_len=strlen(wc_dir); data/fsvs-1.2.9/src/waa.h:196: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). max(strlen(WAA__CONFLICT_EXT), \ data/fsvs-1.2.9/src/waa.h:197: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). strlen(WAA__COPYFROM_EXT)), \ data/fsvs-1.2.9/src/waa.h:198:4: [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(WAA__IGNORE_EXT) ), \ data/fsvs-1.2.9/src/waa.h:200: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). max(max(strlen(WAA__DIR_EXT), \ data/fsvs-1.2.9/src/waa.h:201:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(WAA__FILE_MD5s_EXT)), \ data/fsvs-1.2.9/src/waa.h:202: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). max(strlen(WAA__PROP_EXT), \ data/fsvs-1.2.9/src/waa.h:203:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(WAA__CONFLICT_EXT)) ), \ data/fsvs-1.2.9/src/waa.h:205: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). max(strlen(WAA__FILE_INODE_EXT), \ data/fsvs-1.2.9/src/waa.h:206:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(WAA__DIR_INODE_EXT)), \ data/fsvs-1.2.9/src/waa.h:207: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). max(strlen(WAA__FILE_NAME_EXT), \ data/fsvs-1.2.9/src/waa.h:208:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(WAA__DIR_NAME_EXT)) ) ) ) ANALYSIS SUMMARY: Hits = 331 Lines analyzed = 32201 in approximately 0.86 seconds (37290 lines/second) Physical Source Lines of Code (SLOC) = 16660 Hits@level = [0] 112 [1] 155 [2] 97 [3] 12 [4] 64 [5] 3 Hits@level+ = [0+] 443 [1+] 331 [2+] 176 [3+] 79 [4+] 67 [5+] 3 Hits/KSLOC@level+ = [0+] 26.5906 [1+] 19.8679 [2+] 10.5642 [3+] 4.7419 [4+] 4.02161 [5+] 0.180072 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.