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/gf2x-1.3.0/fft/gf2x-ternary-fft.c
Examining data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_128.c
Examining data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_128.h
Examining data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_64.c
Examining data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_64.h
Examining data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_128.c
Examining data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_128.h
Examining data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_64.c
Examining data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_64.h
Examining data/gf2x-1.3.0/fft/mpfq/mpfq.h
Examining data/gf2x-1.3.0/fft/mpfq/mpfq_gf2n_common.h
Examining data/gf2x-1.3.0/fft/mpfq/mpfq_name_K.h
Examining data/gf2x-1.3.0/fft/gf2x-fft.h
Examining data/gf2x-1.3.0/fft/gf2x-fake-fft.h
Examining data/gf2x-1.3.0/fft/gf2x-cantor-fft.h
Examining data/gf2x-1.3.0/fft/gf2x-ternary-fft.h
Examining data/gf2x-1.3.0/fft/gf2x-cantor-fft.c
Examining data/gf2x-1.3.0/fft/gf2x-fft.c
Examining data/gf2x-1.3.0/fft/gf2x-fake-fft.c
Examining data/gf2x-1.3.0/fft/gf2x_fft_check.c
Examining data/gf2x-1.3.0/fft/gf2x-fft-impl-utils.h
Examining data/gf2x-1.3.0/gf2x/gf2x-impl-export.h
Examining data/gf2x-1.3.0/gf2x/gf2x-small.h
Examining data/gf2x-1.3.0/gf2x/gf2x-impl.h
Examining data/gf2x-1.3.0/gf2x.h
Examining data/gf2x-1.3.0/gf2x.c
Examining data/gf2x-1.3.0/toom.c
Examining data/gf2x-1.3.0/toom128.c
Examining data/gf2x-1.3.0/toom-gpl.c
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul7.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul8.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_nosse/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul7.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul8.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/x86_64_pclmul/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul7.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul8.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/x86_sse2/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/armv7l/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/armv7l/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/armv7l/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/armv7l/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/armv7l/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/coreihwl/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul7.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul8.h
Examining data/gf2x-1.3.0/already_tuned/generic/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/generic32/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/generic32/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/generic64/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/generic64/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/opteron/gf2x-thresholds.h
Examining data/gf2x-1.3.0/already_tuned/opteron/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul7.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul8.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul9.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul1.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul2.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul3.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul4.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul5.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x_mul6.h
Examining data/gf2x-1.3.0/already_tuned/x86_64/gf2x-thresholds.h
Examining data/gf2x-1.3.0/toom-gpl-placeholder.c
Examining data/gf2x-1.3.0/check-gf2x-version.c
Examining data/gf2x-1.3.0/lowlevel/mul3k3.c
Examining data/gf2x-1.3.0/lowlevel/mul1cl.c
Examining data/gf2x-1.3.0/lowlevel/mul2cl.c
Examining data/gf2x-1.3.0/lowlevel/mul2cl2.c
Examining data/gf2x-1.3.0/lowlevel/mul2k.c
Examining data/gf2x-1.3.0/lowlevel/mul2t.c
Examining data/gf2x-1.3.0/lowlevel/mul2t2.c
Examining data/gf2x-1.3.0/lowlevel/mul3cl.c
Examining data/gf2x-1.3.0/lowlevel/mul3k.c
Examining data/gf2x-1.3.0/lowlevel/mul3k2.c
Examining data/gf2x-1.3.0/lowlevel/mul3t.c
Examining data/gf2x-1.3.0/lowlevel/mul4cl1.c
Examining data/gf2x-1.3.0/lowlevel/mul4clk.c
Examining data/gf2x-1.3.0/lowlevel/mul4k.c
Examining data/gf2x-1.3.0/lowlevel/mul4t.c
Examining data/gf2x-1.3.0/lowlevel/mul5clk2.c
Examining data/gf2x-1.3.0/lowlevel/mul5clk_c.c
Examining data/gf2x-1.3.0/lowlevel/mul5k3.c
Examining data/gf2x-1.3.0/lowlevel/mul5k_a.c
Examining data/gf2x-1.3.0/lowlevel/mul5k_b.c
Examining data/gf2x-1.3.0/lowlevel/mul5k_c.c
Examining data/gf2x-1.3.0/lowlevel/mul5k_d.c
Examining data/gf2x-1.3.0/lowlevel/mul6clk2.c
Examining data/gf2x-1.3.0/lowlevel/mul6k_a.c
Examining data/gf2x-1.3.0/lowlevel/mul6k_b.c
Examining data/gf2x-1.3.0/lowlevel/mul6k_c.c
Examining data/gf2x-1.3.0/lowlevel/mul7cl.c
Examining data/gf2x-1.3.0/lowlevel/mul7k.c
Examining data/gf2x-1.3.0/lowlevel/mul7k3.c
Examining data/gf2x-1.3.0/lowlevel/mul8k.c
Examining data/gf2x-1.3.0/lowlevel/mul9cl.c
Examining data/gf2x-1.3.0/lowlevel/mul9clk2.c
Examining data/gf2x-1.3.0/lowlevel/mul9k.c
Examining data/gf2x-1.3.0/lowlevel/mul9k2.c
Examining data/gf2x-1.3.0/lowlevel/mul9k3.c
Examining data/gf2x-1.3.0/lowlevel/gen_bb_mul_code.c
Examining data/gf2x-1.3.0/src/timing.h
Examining data/gf2x-1.3.0/src/tuning-common.h
Examining data/gf2x-1.3.0/src/replace.h
Examining data/gf2x-1.3.0/src/timing.c
Examining data/gf2x-1.3.0/src/check_small_size.c
Examining data/gf2x-1.3.0/src/modify-thresholds.c
Examining data/gf2x-1.3.0/src/replace.c
Examining data/gf2x-1.3.0/src/tunefft.c
Examining data/gf2x-1.3.0/src/tuning-common.c
Examining data/gf2x-1.3.0/src/tunetoom.c
Examining data/gf2x-1.3.0/src/tuneup_pre.c
Examining data/gf2x-1.3.0/src/tuning_undef_wrapper.h
Examining data/gf2x-1.3.0/src/tuning_undefs_pre.h
Examining data/gf2x-1.3.0/tests/bench.c
Examining data/gf2x-1.3.0/tests/check-and-bench-common.c
Examining data/gf2x-1.3.0/tests/test-tools.c
Examining data/gf2x-1.3.0/tests/check-addmul.c
Examining data/gf2x-1.3.0/tests/check-mul.c
Examining data/gf2x-1.3.0/tests/check.c
Examining data/gf2x-1.3.0/tests/test-tools.h
Examining data/gf2x-1.3.0/tests/check-and-bench-common.h
Examining data/gf2x-1.3.0/apps/halfgcd.hpp
Examining data/gf2x-1.3.0/apps/factor.cpp
Examining data/gf2x-1.3.0/apps/halfgcd.cpp

FINAL RESULTS:

data/gf2x-1.3.0/fft/gf2x_fft_check.c:341:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, #E " != " #E "x "                               \
data/gf2x-1.3.0/fft/gf2x_fft_check.c:363:9:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        fprintf(stderr, #F " != " #E " "                                \
data/gf2x-1.3.0/src/check_small_size.c:38:21:  [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, GF2X_WORDSIZE == 64 ?
data/gf2x-1.3.0/fft/gf2x_fft_check.c:131:22:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    unsigned int r = random();
data/gf2x-1.3.0/fft/gf2x_fft_check.c:717:20:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    int i = imin + random() % (imax - imin);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:720:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    if (random() & 8)
data/gf2x-1.3.0/fft/gf2x_fft_check.c:753:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        srandom(seed);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:754:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        next_seed = random();
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1200:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        srandom(seed);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1201:21:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        next_seed = random();
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1277:9:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        srandom(time(NULL));
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1280:13:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            random();
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1283:16:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
        seed = random();
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1296:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            unsigned int na = 100 + (random() % max_nbits_a);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1297:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            unsigned int nb = 100 + (random() % max_nbits_b);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1305:40:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            i += 2 * ULONG_BITS / 3 + (random() % 3);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1316:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            unsigned int na = 100 + (random() % max_nbits_a);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1317:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            unsigned int nb = 100 + (random() % max_nbits_b);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1325:40:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
            i += 2 * ULONG_BITS / 3 + (random() % 3);
data/gf2x-1.3.0/fft/mpfq/mpfq_name_K.h:93:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
#define Krandom(a0,a1)	Kcommon_name_(random) (K,a0,a1)
data/gf2x-1.3.0/src/tunetoom.c:158:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(1);
data/gf2x-1.3.0/src/tuneup_pre.c:69: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.
    benchtime = getenv("GF2X_TUNE_LOWLEVEL_TIME");
data/gf2x-1.3.0/src/tuning-common.c:69:9:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	a[i] = random () | (random () << 31);
data/gf2x-1.3.0/src/tuning-common.c:69:22:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	a[i] = random () | (random () << 31);
data/gf2x-1.3.0/src/tuning-common.c:71:33:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
          a[i] = (a[1] << 31) | random ();
data/gf2x-1.3.0/apps/factor.cpp:696: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 t[17] = "0123456789abcdef";
data/gf2x-1.3.0/apps/factor.cpp:923:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
          m = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:935: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).
          k0 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:946: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).
          b0 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:952: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).
          q0 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:958: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).
          q1 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:964:19:  [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).
          skipd = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:970:18:  [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).
          maxd = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:976: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).
          s0 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:982: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).
          s1 = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:988: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).
          mt = atoi (argv[2]);
data/gf2x-1.3.0/apps/factor.cpp:1002:7:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
  r = atoi (argv[1]);
data/gf2x-1.3.0/fft/gf2x-cantor-fft.c:1702:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(y, x, n * significant_transform_size(p) * sizeof(Kelt));
data/gf2x-1.3.0/fft/gf2x-cantor-fft.h:552: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(o, other, sizeof(struct gf2x_cantor_fft_info));
data/gf2x-1.3.0/fft/gf2x-fake-fft.c:84:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(dst, src, s * sizeof(unsigned long));
data/gf2x-1.3.0/fft/gf2x-fake-fft.h:520: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(o, other, sizeof(struct gf2x_fake_fft_info));
data/gf2x-1.3.0/fft/gf2x-fake-fft.h:569:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(y, x, n * gf2x_fake_fft_transform_size(p) * sizeof(gf2x_fake_fft_elt));
data/gf2x-1.3.0/fft/gf2x-fft-impl-utils.h:75:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(a, b, n * sizeof(unsigned long));
data/gf2x-1.3.0/fft/gf2x-ternary-fft.c:677:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(y, x, n * gf2x_ternary_fft_transform_size(o) * sizeof(gf2x_ternary_fft_elt));
data/gf2x-1.3.0/fft/gf2x-ternary-fft.c:1168:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(o, other, sizeof(struct gf2x_ternary_fft_info));
data/gf2x-1.3.0/fft/gf2x-ternary-fft.c:1174: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(o->perm, other->perm, o->K * sizeof(size_t));
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1250: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).
            max_nbits_a = atol(argv[0]);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1253: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).
            max_nbits_b = atol(argv[0]);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1256:20:  [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).
            seed = atol(argv[0]);
data/gf2x-1.3.0/fft/gf2x_fft_check.c:1259:20:  [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).
            nrep = atol(argv[0]);
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_128.h:127: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt));
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_128.h:179: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt_ur));
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_128.h:186:46:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memset(r, 0, sizeof(mpfq_2_128_elt_ur)); memcpy(r,s,sizeof(mpfq_2_128_elt));
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_64.h:127: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt));
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_64.h:179: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt_ur));
data/gf2x-1.3.0/fft/mpfq/i386/mpfq_2_64.h:186:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memset(r, 0, sizeof(mpfq_2_64_elt_ur)); memcpy(r,s,sizeof(mpfq_2_64_elt));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_128.h:127: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_128.h:179: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_128_elt_ur));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_128.h:186:46:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memset(r, 0, sizeof(mpfq_2_128_elt_ur)); memcpy(r,s,sizeof(mpfq_2_128_elt));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_64.h:127: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_64.h:177: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.
    if (r != s) memcpy(r,s,sizeof(mpfq_2_64_elt_ur));
data/gf2x-1.3.0/fft/mpfq/x86_64/mpfq_2_64.h:184:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memset(r, 0, sizeof(mpfq_2_64_elt_ur)); memcpy(r,s,sizeof(mpfq_2_64_elt));
data/gf2x-1.3.0/gf2x.c:252: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(c, dst, sc * sizeof(unsigned long));
data/gf2x-1.3.0/gf2x/gf2x-impl.h:99:37:  [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.
#define gf2x_static_assert(name, x) char name[gf2x_is_static_true(x)] GF2X_MAYBE_UNUSED
data/gf2x-1.3.0/lowlevel/gen_bb_mul_code.c:45:9:  [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).
    w = atoi(argv[1]);
data/gf2x-1.3.0/lowlevel/gen_bb_mul_code.c:46:9:  [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).
    K = atoi(argv[2]);
data/gf2x-1.3.0/src/modify-thresholds.c:105:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[1024];
data/gf2x-1.3.0/src/modify-thresholds.c:109:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char token[16];
data/gf2x-1.3.0/src/modify-thresholds.c:391: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(&(fft_tbl[j]),&(fft_tbl[i]),sizeof(struct fft_tuning_pair));
data/gf2x-1.3.0/src/replace.c:74: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[1024];
data/gf2x-1.3.0/src/replace.c:75: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 id[80];
data/gf2x-1.3.0/src/replace.c:80:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fi = fopen(fname, "r");
data/gf2x-1.3.0/src/replace.c:81:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fo = fopen(fname_out, "w");
data/gf2x-1.3.0/src/tunefft.c:157:18:  [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).
            K0 = atoi(argv[0]);
data/gf2x-1.3.0/src/tunefft.c:162:20:  [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).
            maxn = atoi(argv[0]);
data/gf2x-1.3.0/src/tunefft.c:168:20:  [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).
            maxn = atoi(argv[0]);
data/gf2x-1.3.0/src/tunefft.c: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 date[40];
data/gf2x-1.3.0/src/tunefft.c:241: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(u, c, 2 * maxn * sizeof(unsigned long));
data/gf2x-1.3.0/src/tunetoom.c:439:31:  [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).
            tabsz1 = tabsz2 = atoi(argv[0]);
data/gf2x-1.3.0/src/tunetoom.c:444:22:  [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).
            tabsz2 = atoi(argv[0]);
data/gf2x-1.3.0/src/tunetoom.c:460:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char date[40];
data/gf2x-1.3.0/src/tuning-common.c:142:19:  [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).
        if ((rp = fopen(outfile, "w")) == NULL) {
data/gf2x-1.3.0/tests/bench.c:149:13:  [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).
	    step = atoi(argv[++i]);
data/gf2x-1.3.0/tests/bench.c:153:10:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	    d = atoi(argv[++i]);
data/gf2x-1.3.0/tests/bench.c:161:24:  [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).
            supplied = atol(argv[++i]);
data/gf2x-1.3.0/tests/bench.c:165:20:  [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).
            nmin = atoi(argv[i]);
data/gf2x-1.3.0/tests/bench.c:170:20:  [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).
            nmax = atoi(argv[i]);
data/gf2x-1.3.0/tests/check-mul.c:48:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    int n1 = atoi(argv[1]);
data/gf2x-1.3.0/tests/check-mul.c:51:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        n2 = atoi(argv[2]);
data/gf2x-1.3.0/tests/check.c:160:27:  [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).
            n32bitwords = atoi(argv[++i]);
data/gf2x-1.3.0/tests/check.c:164:17:  [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).
            k = atoi(argv[++i]);
data/gf2x-1.3.0/toom-gpl.c:1650:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (aa, a, n * sizeof(unsigned long));
data/gf2x-1.3.0/toom-gpl.c:1653:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (bb, b, n * sizeof(unsigned long));
data/gf2x-1.3.0/toom-gpl.c:1658:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
      memcpy (c, cc, 2 * n * sizeof(unsigned long));
data/gf2x-1.3.0/toom-gpl.c:1669:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy (aa, a, n * sizeof(unsigned long));
data/gf2x-1.3.0/toom-gpl.c:1678:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy (bb, b, n * sizeof(unsigned long));
data/gf2x-1.3.0/toom-gpl.c:1691: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 (c, cc, 2 * n * sizeof(unsigned long));
data/gf2x-1.3.0/fft/mpfq/mpfq_name_K.h:152:36:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
#define Kread(a0,a1)	Kcommon_name_(read) (K,a0,a1)
data/gf2x-1.3.0/src/modify-thresholds.c:90:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned long l = strlen(key);
data/gf2x-1.3.0/src/modify-thresholds.c:128:13:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
        r = sscanf(buf, "%15s %" SCNd64 " %d", token, &sz, &m);
data/gf2x-1.3.0/src/replace.c:49:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    unsigned long l = strlen(ptr->string);
data/gf2x-1.3.0/src/replace.c:73: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).
    size_t sl = strlen(fname)+10;
data/gf2x-1.3.0/src/replace.c:99:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(id,x,y-x);
data/gf2x-1.3.0/src/replace.c:115: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).
            x = buffer + strlen(buffer) - 1;
data/gf2x-1.3.0/src/tunefft.c:187: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).
	u = strlen(date);
data/gf2x-1.3.0/src/tunetoom.c:466: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).
        u = strlen(date);

ANALYSIS SUMMARY:

Hits = 106
Lines analyzed = 31187 in approximately 1.23 seconds (25414 lines/second)
Physical Source Lines of Code (SLOC) = 20431
Hits@level = [0] 414 [1]   9 [2]  72 [3]  22 [4]   3 [5]   0
Hits@level+ = [0+] 520 [1+] 106 [2+]  97 [3+]  25 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 25.4515 [1+] 5.18819 [2+] 4.74769 [3+] 1.22363 [4+] 0.146836 [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.