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/check-0.12.0/lib/alarm.c
Examining data/check-0.12.0/lib/localtime_r.c
Examining data/check-0.12.0/lib/libcompat.h
Examining data/check-0.12.0/lib/timer_create.c
Examining data/check-0.12.0/lib/strsignal.c
Examining data/check-0.12.0/lib/timer_delete.c
Examining data/check-0.12.0/lib/snprintf.c
Examining data/check-0.12.0/lib/gettimeofday.c
Examining data/check-0.12.0/lib/getline.c
Examining data/check-0.12.0/lib/clock_gettime.c
Examining data/check-0.12.0/lib/malloc.c
Examining data/check-0.12.0/lib/libcompat.c
Examining data/check-0.12.0/lib/fpclassify.c
Examining data/check-0.12.0/lib/strdup.c
Examining data/check-0.12.0/lib/realloc.c
Examining data/check-0.12.0/lib/timer_settime.c
Examining data/check-0.12.0/src/check_run.c
Examining data/check-0.12.0/src/check_log.c
Examining data/check-0.12.0/src/check_list.c
Examining data/check-0.12.0/src/check_error.c
Examining data/check-0.12.0/src/check.c
Examining data/check-0.12.0/src/check_msg.h
Examining data/check-0.12.0/src/check_pack.h
Examining data/check-0.12.0/src/check_msg.c
Examining data/check-0.12.0/src/check_impl.h
Examining data/check-0.12.0/src/check_str.h
Examining data/check-0.12.0/src/check.h
Examining data/check-0.12.0/src/check_str.c
Examining data/check-0.12.0/src/check_print.h
Examining data/check-0.12.0/src/check_print.c
Examining data/check-0.12.0/src/check_list.h
Examining data/check-0.12.0/src/check_error.h
Examining data/check-0.12.0/src/check_log.h
Examining data/check-0.12.0/src/check_pack.c
Examining data/check-0.12.0/tests/check_nofork.c
Examining data/check-0.12.0/tests/check_check_export_main.c
Examining data/check-0.12.0/tests/check_list.c
Examining data/check-0.12.0/tests/check_check_tags.c
Examining data/check-0.12.0/tests/check_check.h
Examining data/check-0.12.0/tests/check_check_msg.c
Examining data/check-0.12.0/tests/check_check_exit.c
Examining data/check-0.12.0/tests/check_stress.c
Examining data/check-0.12.0/tests/check_nofork_teardown.c
Examining data/check-0.12.0/tests/check_check_log.c
Examining data/check-0.12.0/tests/check_check_selective.c
Examining data/check-0.12.0/tests/check_check_sub.c
Examining data/check-0.12.0/tests/check_check_master.c
Examining data/check-0.12.0/tests/check_set_max_msg_size.c
Examining data/check-0.12.0/tests/check_check_main.c
Examining data/check-0.12.0/tests/check_check_log_internal.c
Examining data/check-0.12.0/tests/check_check_limit.c
Examining data/check-0.12.0/tests/check_thread_stress.c
Examining data/check-0.12.0/tests/ex_output.c
Examining data/check-0.12.0/tests/check_check_pack.c
Examining data/check-0.12.0/tests/check_mem_leaks.c
Examining data/check-0.12.0/tests/check_check_fixture.c
Examining data/check-0.12.0/tests/check_check_fork.c
Examining data/check-0.12.0/doc/example/src/money.2.h
Examining data/check-0.12.0/doc/example/src/money.1.h
Examining data/check-0.12.0/doc/example/src/money.1.c
Examining data/check-0.12.0/doc/example/src/main.c
Examining data/check-0.12.0/doc/example/src/money.3.c
Examining data/check-0.12.0/doc/example/src/money.h
Examining data/check-0.12.0/doc/example/src/money.6.c
Examining data/check-0.12.0/doc/example/src/money.4.c
Examining data/check-0.12.0/doc/example/src/money.c
Examining data/check-0.12.0/doc/example/src/money.5.c
Examining data/check-0.12.0/doc/example/tests/check_money.1.c
Examining data/check-0.12.0/doc/example/tests/check_money.2.c
Examining data/check-0.12.0/doc/example/tests/check_money.6.c
Examining data/check-0.12.0/doc/example/tests/check_money.3.c
Examining data/check-0.12.0/doc/example/tests/check_money.7.c
Examining data/check-0.12.0/doc/example/tests/check_money.c
Examining data/check-0.12.0/check_stdint.h

FINAL RESULTS:

data/check-0.12.0/lib/libcompat.h:239:9:  [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.
#define vsnprintf rpl_vsnprintf
data/check-0.12.0/lib/libcompat.h:244:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf rpl_snprintf
data/check-0.12.0/lib/snprintf.c:198:8:  [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.
#ifdef snprintf
data/check-0.12.0/lib/snprintf.c:199:8:  [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.
#undef snprintf
data/check-0.12.0/lib/snprintf.c:201:8:  [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.
#ifdef vsnprintf
data/check-0.12.0/lib/snprintf.c:202:8:  [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.
#undef vsnprintf
data/check-0.12.0/lib/snprintf.c:260:9:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#define snprintf rpl_snprintf
data/check-0.12.0/lib/snprintf.c:261:9:  [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.
#define vsnprintf rpl_vsnprintf
data/check-0.12.0/lib/snprintf.c:1473:8:  [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.
	len = vsnprintf(str, size, format, ap);
data/check-0.12.0/lib/snprintf.c:1979:9:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
			r1 = sprintf(buf1, fmt[i], val[j]);                    \
data/check-0.12.0/lib/snprintf.c:1980: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.
			r2 = snprintf(buf2, sizeof(buf2), fmt[i], val[j]);     \
data/check-0.12.0/src/check.c:380:9:  [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.
        vsnprintf(buf, BUFSIZ, msg, ap);
data/check-0.12.0/src/check_error.c:47:5:  [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(stderr, fmt, args);
data/check-0.12.0/src/check_str.c:91:13:  [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.
        n = vsnprintf(p, size, fmt, ap);
data/check-0.12.0/tests/check_check_fixture.c:605:7:  [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(errm, trm);
data/check-0.12.0/src/check.c:121:11:  [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.
    env = getenv("CK_DEFAULT_TIMEOUT");
data/check-0.12.0/src/check.c:133:11:  [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.
    env = getenv("CK_TIMEOUT_MULTIPLIER");
data/check-0.12.0/src/check.c:319: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.
        char *env = getenv("CK_TIMEOUT_MULTIPLIER");
data/check-0.12.0/src/check_log.c:63:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return getenv("CK_LOG_FILE_NAME");
data/check-0.12.0/src/check_log.c:87:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return getenv("CK_XML_LOG_FILE_NAME");
data/check-0.12.0/src/check_log.c:110:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    return getenv("CK_TAP_LOG_FILE_NAME");
data/check-0.12.0/src/check_msg.c:253: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.
        char *tmp = getenv("TEMP");
data/check-0.12.0/src/check_msg.c:254:26:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
        char *tmp_file = tempnam(tmp, "check_");
data/check-0.12.0/src/check_msg.c:282:27:  [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.
    const char *tmp_dir = getenv ("TEMP");
data/check-0.12.0/src/check_msg.c:291:19:  [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.
        tmp_dir = getenv ("TMPDIR");
data/check-0.12.0/src/check_pack.c:62:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *env = getenv("CK_MAX_MSG_SIZE");
data/check-0.12.0/src/check_print.c:235:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *env = getenv("CK_VERBOSITY");
data/check-0.12.0/src/check_run.c:728: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.
        char *env = getenv("CK_FORK");
data/check-0.12.0/src/check_run.c:782:18:  [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.
        tcname = getenv("CK_RUN_CASE");
data/check-0.12.0/src/check_run.c:784:10:  [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.
	sname = getenv("CK_RUN_SUITE");
data/check-0.12.0/src/check_run.c:786:17:  [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.
	include_tags = getenv("CK_INCLUDE_TAGS");
data/check-0.12.0/src/check_run.c:788:17:  [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.
	exclude_tags = getenv("CK_EXCLUDE_TAGS");
data/check-0.12.0/tests/check_check_log.c:34:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  *old_value = getenv(name);
data/check-0.12.0/tests/check_check_master.c:850:26:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
  test_names_file_name = tempnam(NULL, "check_test_names_");
data/check-0.12.0/tests/check_check_master.c:852:33:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
  line_num_failures_file_name = tempnam(NULL, "check_error_linenums_");
data/check-0.12.0/lib/snprintf.c:946: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 iconvert[MAX_CONVERT_LENGTH];
data/check-0.12.0/lib/snprintf.c:1054: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 iconvert[MAX_CONVERT_LENGTH];
data/check-0.12.0/lib/snprintf.c:1055: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 fconvert[MAX_CONVERT_LENGTH];
data/check-0.12.0/lib/snprintf.c:1056: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 econvert[4];	/* "e-12" (without nul-termination). */
data/check-0.12.0/lib/snprintf.c:1956: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 buf1[1024], buf2[1024];
data/check-0.12.0/lib/snprintf.c:2011: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.
		(void)sprintf(buf1, "%.1f", value);
data/check-0.12.0/lib/strsignal.c:25: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 signame[40];
data/check-0.12.0/lib/strsignal.c:27:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(signame, "SIG #%d", sig);
data/check-0.12.0/src/check.c:366: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 buf[BUFSIZ];
data/check-0.12.0/src/check.h:1547: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 _ck_x_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
data/check-0.12.0/src/check.h:1548: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 _ck_y_str[CK_MAX_ASSERT_MEM_PRINT_SIZE * 2 + 1]; \
data/check-0.12.0/src/check_log.c:153:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[100];
data/check-0.12.0/src/check_log.c:273: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 t[sizeof "yyyy-mm-dd hh:mm:ss"] = { 0 };
data/check-0.12.0/src/check_log.c:460:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        f = fopen(filename, "w");
data/check-0.12.0/src/check_msg.c:243:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    file = tmpfile();
data/check-0.12.0/src/check_msg.c:268:16:  [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).
        file = fopen(uniq_tmp_file, "w+b");
data/check-0.12.0/src/check_msg.c:300:20:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    if (-1 < (fd = mkstemp (*name)))
data/check-0.12.0/src/check_pack.c:188: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(*buf, val, strsz);
data/check-0.12.0/src/check_pack.c:203: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(val, *buf, strsz);
data/check-0.12.0/src/check_print.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 result[10];
data/check-0.12.0/tests/check_check_fixture.c:32:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char errm[200];
data/check-0.12.0/tests/check_check_fixture.c:582: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 errm[1024] = {0};
data/check-0.12.0/tests/check_check_master.c:64:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char signal_11_str[SIG_STR_LEN];
data/check-0.12.0/tests/check_check_master.c:65:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char signal_11_8_str[SIG_STR_LEN];
data/check-0.12.0/tests/check_check_master.c:66:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char signal_8_str[SIG_STR_LEN];
data/check-0.12.0/tests/check_check_master.c:477: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 emsg[MAXSTR];
data/check-0.12.0/tests/check_check_master.c:481: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 err_text[256];
data/check-0.12.0/tests/check_check_master.c:681: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 emsg[MAXSTR];
data/check-0.12.0/tests/check_check_master.c:683: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 err_text[256];
data/check-0.12.0/tests/check_check_master.c:851:21:  [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).
  test_names_file = fopen(test_names_file_name, "w+b");
data/check-0.12.0/tests/check_check_master.c:853:23:  [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).
  line_num_failures = fopen(line_num_failures_file_name, "w+b");
data/check-0.12.0/tests/check_check_master.c:856:28:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  test_names_file = fdopen(mkstemp(test_names_file_name), "w+b");
data/check-0.12.0/tests/check_check_master.c:858:30:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
  line_num_failures = fdopen(mkstemp(line_num_failures_file_name), "w+b");
data/check-0.12.0/tests/check_check_master.c:935: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 string[16];
data/check-0.12.0/tests/check_check_pack.c:33:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char errm[512];
data/check-0.12.0/tests/check_set_max_msg_size.c:68:28:  [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).
    check_set_max_msg_size(atoi(argv[1])); // the 2nd call will override it.
data/check-0.12.0/lib/getline.c:39:26:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
     while( (character = fgetc(stream)) != EOF)
data/check-0.12.0/src/check_error.c:51: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).
    if(fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':')
data/check-0.12.0/src/check_pack.c:182: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).
        strsz = strlen(val);
data/check-0.12.0/src/check_pack.c:270: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).
    len = 4 + 4 + (lmsg->file ? strlen(lmsg->file) : 0) + 4;
data/check-0.12.0/src/check_pack.c:291: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).
    len = 4 + 4 + (fmsg->msg ? strlen(fmsg->msg) : 0);
data/check-0.12.0/tests/check_check_fixture.c:601: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).
      if (strlen(errm) + strlen(trm) > 1022) {
data/check-0.12.0/tests/check_check_fixture.c:601: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).
      if (strlen(errm) + strlen(trm) > 1022) {
data/check-0.12.0/tests/check_check_fixture.c:606:7:  [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(errm, "\n");
data/check-0.12.0/tests/check_check_sub.c:2593:3:  [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(25*1000);

ANALYSIS SUMMARY:

Hits = 80
Lines analyzed = 18842 in approximately 0.49 seconds (38372 lines/second)
Physical Source Lines of Code (SLOC) = 12149
Hits@level = [0]  84 [1]   9 [2]  36 [3]  20 [4]  15 [5]   0
Hits@level+ = [0+] 164 [1+]  80 [2+]  71 [3+]  35 [4+]  15 [5+]   0
Hits/KSLOC@level+ = [0+] 13.4991 [1+] 6.5849 [2+] 5.8441 [3+] 2.8809 [4+] 1.23467 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.