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/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl_unix.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_global.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_win.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_mutex_unix.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_spawn_ctl.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bridge.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_mutex.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl_win.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_unix.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bucket.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_spawn_ctl.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_filter.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_filter.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bucket.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.h
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bridge.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_win.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c
Examining data/libapache2-mod-fcgid-2.3.9/modules/fcgid/mod_fcgid.c

FINAL RESULTS:

data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_unix.c:391:17:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
            if (chown(sconf->sockname_prefix,
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:305:13:  [5] (race) chown:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchown( ) instead.
        if (chown(unix_addr.sun_path, ap_unixd_config.user_id, -1) < 0) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:727:41:  [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.
                            const char *access)
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:735:26:  [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.
    apr_tokenize_to_argv(access, &args, cmd->temp_pool);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:743:62:  [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.
        return missing_file_msg(cmd->pool, "Access checker", access, rv);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:751:39:  [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.
    dirconfig->access_info->cmdline = access;
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_mutex_unix.c:118:5:  [3] (tmpfile) tmpnam:
  Temporary file race condition (CWE-377).
    tmpnam(lockfile);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:472:22:  [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 (!(env_temp = getenv("PATH"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:478:21:  [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 ((env_temp = getenv("SYSTEMROOT"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:481:21:  [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 ((env_temp = getenv("COMSPEC"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:484:21:  [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 ((env_temp = getenv("PATHEXT"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:487:21:  [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 ((env_temp = getenv("WINDIR"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:491:21:  [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 ((env_temp = getenv("COMSPEC")) != NULL) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:494:21:  [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 ((env_temp = getenv("ETC")) != NULL) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:497:21:  [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 ((env_temp = getenv("DPATH")) != NULL) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:500:21:  [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 ((env_temp = getenv("PERLLIB_PREFIX")) != NULL) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:504:21:  [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 ((env_temp = getenv("LIBRARY_PATH")) != NULL) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:508:21:  [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 ((env_temp = getenv("LIBPATH"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:514:21:  [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 ((env_temp = getenv("DYLD_LIBRARY_PATH"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:518:21:  [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 ((env_temp = getenv("SHLIB_PATH"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:522:21:  [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 ((env_temp = getenv("LD_LIBRARY_PATH"))) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bridge.c:298: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 sbuf[MAX_STRING_LEN];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bridge.c:686:21:  [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(pcopydata, data, len);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bridge.c:714: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 sizestr[21];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bucket.c:99: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((apr_byte_t *)&header + hasread, buffer, putsize);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_bucket.c:136: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(logbuf + hasput, buffer, willput);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:222:28:  [2] (integer) atol:
  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).
    config->idle_timeout = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:239:34:  [2] (integer) atol:
  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).
    config->idle_scan_interval = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:249:28:  [2] (integer) atol:
  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).
    config->busy_timeout = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:266:34:  [2] (integer) atol:
  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).
    config->busy_scan_interval = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:277:29:  [2] (integer) atol:
  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).
    config->proc_lifetime = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:294:35:  [2] (integer) atol:
  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).
    config->error_scan_interval = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:310:36:  [2] (integer) atol:
  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).
    config->zombie_scan_interval = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:362:34:  [2] (integer) atol:
  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).
    config->spawnscore_uplimit = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:405:35:  [2] (integer) atol:
  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).
    config->max_mem_request_len = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:421:27:  [2] (integer) atol:
  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).
    config->spawn_score = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:436:26:  [2] (integer) atol:
  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).
    config->time_score = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:452:33:  [2] (integer) atol:
  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).
    config->termination_score = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:467:33:  [2] (integer) atol:
  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).
    config->max_process_count = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:477:33:  [2] (integer) atol:
  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).
    config->output_buffersize = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:489:39:  [2] (integer) atol:
  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).
    config->max_class_process_count = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:501:39:  [2] (integer) atol:
  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).
    config->min_class_process_count = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:518:39:  [2] (integer) atol:
  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).
    config->php_fix_pathinfo_enable = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:528:45:  [2] (integer) atol:
  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 ((config->max_requests_per_process = atol(arg)) == -1) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:541:35:  [2] (integer) atol:
  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).
    config->ipc_connect_timeout = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:552:32:  [2] (integer) atol:
  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).
    config->ipc_comm_timeout = atol(arg);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:611: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 errbuf[120];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1024:44:  [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).
            cmdopts->ipc_connect_timeout = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1033:37:  [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).
            cmdopts->idle_timeout = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1064:41:  [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).
            cmdopts->ipc_comm_timeout = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1073:48:  [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).
            cmdopts->max_class_process_count = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1082:38:  [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).
            cmdopts->proc_lifetime = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1091:49:  [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).
            cmdopts->max_requests_per_process = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1100:48:  [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).
            cmdopts->min_class_process_count = atoi(val);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.h:144: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 initenv_key[INITENV_CNT][INITENV_KEY_LEN];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.h:145: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 initenv_val[INITENV_CNT][INITENV_VAL_LEN];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm.h:24: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 cgipath[FCGID_PATH_MAX];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm.h:25: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 cmdline[FCGID_CMDLINE_MAX];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm.h:32: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 server_hostname[32];   /* for logging only; ok to truncate */
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_unix.c:199:25:  [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).
            uid_t uid = atoi(&ap_unixd_config.user_name[1]);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_win.c: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.
        memcpy(postcmd, command, sizeof(*command));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_win.c:243: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(command, peakcmd, sizeof(*peakcmd));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:168: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 errno_desc[120];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:169: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 errmsg[240];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:747:36:  [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.
                vec[i].iov_base = (char *) vec[i].iov_base +
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:817: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 signal_info[HUGE_STRING_LEN];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_win.c:71: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 sock_path[FCGID_PATH_MAX];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl.h:45: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 executable_path[FCGID_PATH_MAX]; /* executable file path */
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl.h:46: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 socket_path[FCGID_PATH_MAX]; /* cgi application socket path */
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proctbl.h:49: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 cmdline[FCGID_CMDLINE_MAX]; /* entire command line */
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.c:79: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(cur_buf, *envp, namelen);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.c:81: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(cur_buf, spliter + 1, valuelen);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.h:73: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 reserved[5];
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:887: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).
    if (strlen(path) >= FCGID_PATH_MAX) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:892: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).
    if (strlen(wrapper_cmdline) >= FCGID_CMDLINE_MAX) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:906: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).
    apr_hash_set(config->wrapper_info_hash, extension, strlen(extension),
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:928: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).
                               strlen(extension));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:931: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).
                                   strlen(DEFAULT_WRAPPER_KEY));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:998: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).
    if (!strlen(cmdname)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1021: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1030: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1042: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 (!strlen(name)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1061: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1070: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1079: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1088: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1097: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 (!strlen(val)) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1116: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).
    apr_hash_set(sconf->cmdopts_hash, cmdname, strlen(cmdname), cmdopts);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_conf.c:1129: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).
                                                   strlen(cmdpath));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_main.c:562: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).
    AP_DEBUG_ASSERT(sizeof procnode->cmdline > strlen(command->cmdline));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_unix.c:442: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).
    AP_DEBUG_ASSERT(sizeof command->cgipath > strlen(cmd_conf->cgipath));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_unix.c:444: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).
    AP_DEBUG_ASSERT(sizeof command->cmdline > strlen(cmd_conf->cmdline));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_win.c:140: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).
    AP_DEBUG_ASSERT(sizeof command->cgipath > strlen(cmd_conf->cgipath));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_pm_win.c:142: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).
    AP_DEBUG_ASSERT(sizeof command->cmdline > strlen(cmd_conf->cmdline));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:175:34:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    write(STDERR_FILENO, errmsg, strlen(errmsg));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:241: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).
    AP_DEBUG_ASSERT(strlen(wargv[0]) < sizeof(procnode->executable_path));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:271:13:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    omask = umask(0077);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:274:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(omask);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:530:49:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    AP_DEBUG_ASSERT(sizeof unix_addr.sun_path > strlen(procnode->socket_path));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:578:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((retcode = read(unix_socket, (void *) buffer, *size)) > 0) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_proc_unix.c:612:24:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        if ((retcode = read(unix_socket, (void *) buffer, *size)) > 0) {
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/fcgid_protocol.c:38: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).
        valuelen = strlen(spliter + 1);
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/mod_fcgid.c:118:57:  [1] (buffer) strlen:
  Does not handle 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 *res = (char *)apr_palloc(a, sizeof("HTTP_") + strlen(w));
data/libapache2-mod-fcgid-2.3.9/modules/fcgid/mod_fcgid.c:262: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).
        if (strlen(command) >= fcgid_min(FCGID_PATH_MAX, FCGID_CMDLINE_MAX)) {

ANALYSIS SUMMARY:

Hits = 104
Lines analyzed = 8206 in approximately 0.24 seconds (34735 lines/second)
Physical Source Lines of Code (SLOC) = 5912
Hits@level = [0]   0 [1]  31 [2]  52 [3]  15 [4]   4 [5]   2
Hits@level+ = [0+] 104 [1+] 104 [2+]  73 [3+]  21 [4+]   6 [5+]   2
Hits/KSLOC@level+ = [0+] 17.5913 [1+] 17.5913 [2+] 12.3478 [3+] 3.5521 [4+] 1.01488 [5+] 0.338295
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.