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/libmath-prime-util-perl-0.73/montmath.h
Examining data/libmath-prime-util-perl-0.73/chacha.h
Examining data/libmath-prime-util-perl-0.73/entropy.c
Examining data/libmath-prime-util-perl-0.73/factor.h
Examining data/libmath-prime-util-perl-0.73/threadlock.h
Examining data/libmath-prime-util-perl-0.73/aks.c
Examining data/libmath-prime-util-perl-0.73/random_prime.h
Examining data/libmath-prime-util-perl-0.73/util.c
Examining data/libmath-prime-util-perl-0.73/random_prime.c
Examining data/libmath-prime-util-perl-0.73/sieve.c
Examining data/libmath-prime-util-perl-0.73/cache.h
Examining data/libmath-prime-util-perl-0.73/lmo.h
Examining data/libmath-prime-util-perl-0.73/lmo.c
Examining data/libmath-prime-util-perl-0.73/csprng.c
Examining data/libmath-prime-util-perl-0.73/ramanujan_primes.h
Examining data/libmath-prime-util-perl-0.73/keyval.h
Examining data/libmath-prime-util-perl-0.73/semi_primes.c
Examining data/libmath-prime-util-perl-0.73/ppport.h
Examining data/libmath-prime-util-perl-0.73/prime_nth_count.c
Examining data/libmath-prime-util-perl-0.73/cache.c
Examining data/libmath-prime-util-perl-0.73/aks.h
Examining data/libmath-prime-util-perl-0.73/entropy.h
Examining data/libmath-prime-util-perl-0.73/primality.c
Examining data/libmath-prime-util-perl-0.73/prime_nth_count.h
Examining data/libmath-prime-util-perl-0.73/ramanujan_primes.c
Examining data/libmath-prime-util-perl-0.73/sieve.h
Examining data/libmath-prime-util-perl-0.73/chacha.c
Examining data/libmath-prime-util-perl-0.73/mulmod.h
Examining data/libmath-prime-util-perl-0.73/ptypes.h
Examining data/libmath-prime-util-perl-0.73/prime_count_tables.h
Examining data/libmath-prime-util-perl-0.73/sieve_cluster.c
Examining data/libmath-prime-util-perl-0.73/util.h
Examining data/libmath-prime-util-perl-0.73/primality.h
Examining data/libmath-prime-util-perl-0.73/constants.h
Examining data/libmath-prime-util-perl-0.73/csprng.h
Examining data/libmath-prime-util-perl-0.73/factor.c
Examining data/libmath-prime-util-perl-0.73/lehmer.c
Examining data/libmath-prime-util-perl-0.73/lehmer.h
Examining data/libmath-prime-util-perl-0.73/sieve_cluster.h
Examining data/libmath-prime-util-perl-0.73/multicall.h
Examining data/libmath-prime-util-perl-0.73/semi_primes.h

FINAL RESULTS:

data/libmath-prime-util-perl-0.73/lehmer.c:99:37:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
#define croak(fmt,...)            { printf(fmt,##__VA_ARGS__); exit(1); }
data/libmath-prime-util-perl-0.73/lmo.c:587:9:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    f = popen(cmd, "r");
data/libmath-prime-util-perl-0.73/ppport.h:7585:14:  [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.
    retval = vsnprintf(buffer, len, format, ap);
data/libmath-prime-util-perl-0.73/ppport.h:7587:14:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    retval = vsprintf(buffer, format, ap);
data/libmath-prime-util-perl-0.73/ppport.h:7617:5:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    vsprintf(buffer, pat, args);
data/libmath-prime-util-perl-0.73/ptypes.h:68:39:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  #define croak(fmt,...)            { printf(fmt,##__VA_ARGS__); exit(3); }
data/libmath-prime-util-perl-0.73/ptypes.h:141:37:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  if (_XS_get_verbose() >= level) { printf(fmt,##__VA_ARGS__); fflush(stdout); }
data/libmath-prime-util-perl-0.73/aks.c:180:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(px, res, r * sizeof(UV)); /* put result in px */
data/libmath-prime-util-perl-0.73/aks.c:255:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(px, res, r * sizeof(UV)); /* put result in px */
data/libmath-prime-util-perl-0.73/chacha.c:100:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(x, s, 16*sizeof(uint32_t));
data/libmath-prime-util-perl-0.73/chacha.c:117:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(buf, x, 16*sizeof(uint32_t));
data/libmath-prime-util-perl-0.73/chacha.c:139: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 sbuf[CORESZ];
data/libmath-prime-util-perl-0.73/chacha.c:142: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(buf, sbuf, r);
data/libmath-prime-util-perl-0.73/chacha.c:184:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char keys[6][40] = { {0},{0},{0},{0},{0} };
data/libmath-prime-util-perl-0.73/chacha.c:185: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 ebuf[6][129] = {
data/libmath-prime-util-perl-0.73/chacha.c:205: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 got[129];
data/libmath-prime-util-perl-0.73/chacha.c:216:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(got+2*i,"%02x", ctx.buf[i]);
data/libmath-prime-util-perl-0.73/chacha.c:225:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char keys[2][40] = { {0},{0} };
data/libmath-prime-util-perl-0.73/chacha.c:226: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 ebuf[2][1024+1] = {
data/libmath-prime-util-perl-0.73/chacha.c:240: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 kbuf[512];
data/libmath-prime-util-perl-0.73/chacha.c:241: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 got[1024+1];
data/libmath-prime-util-perl-0.73/chacha.c:251:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(got+2*i,"%02x", kbuf[i]);
data/libmath-prime-util-perl-0.73/chacha.c:285: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(data, cs->buf + BUFSZ - cs->have, copybytes);
data/libmath-prime-util-perl-0.73/chacha.h:14:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char buf[BUFSZ];
data/libmath-prime-util-perl-0.73/csprng.c:121:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char seed[SEED_BYTES + 4];
data/libmath-prime-util-perl-0.73/csprng.c:125: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(seed, data, SEED_BYTES);
data/libmath-prime-util-perl-0.73/csprng.c:129: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(seed, data, bytes);
data/libmath-prime-util-perl-0.73/csprng.c:156:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char seed[4] = {0};
data/libmath-prime-util-perl-0.73/csprng.c:160:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  unsigned char seed[8] = {0};
data/libmath-prime-util-perl-0.73/entropy.c:68: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).
  FILE *f = fopen("/dev/urandom", "rb");
data/libmath-prime-util-perl-0.73/entropy.c:71:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen("/dev/random", "rb");
data/libmath-prime-util-perl-0.73/factor.c:1830: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 line[1024];
data/libmath-prime-util-perl-0.73/lehmer.c:153: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(primes, tiny_primes, (n+1) * sizeof(uint32_t));
data/libmath-prime-util-perl-0.73/lehmer.c:160: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(primes+1,  &v[0],  n * sizeof(uint32_t));
data/libmath-prime-util-perl-0.73/lmo.c:142:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
  memcpy(plist+1, psprimes, *number_of_primes * sizeof(uint32_t));
data/libmath-prime-util-perl-0.73/lmo.c:487: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(source+from, source, sizeof(sword_t)*words);
data/libmath-prime-util-perl-0.73/lmo.c:585: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 cmd[100];
data/libmath-prime-util-perl-0.73/lmo.c:586: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(cmd, "primecount %lu", n);
data/libmath-prime-util-perl-0.73/ppport.h:3920:42:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define CopyD(s,d,n,t)                 memcpy((char*)(d),(char*)(s), (n) * sizeof(t))
data/libmath-prime-util-perl-0.73/ppport.h:7438:38:  [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.
                && (xdigit = strchr((char *) PL_hexdigit, s[1])))
data/libmath-prime-util-perl-0.73/ppport.h:7664: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(dst + used, src, copy);
data/libmath-prime-util-perl-0.73/ppport.h:7694: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(dst, src, copy);
data/libmath-prime-util-perl-0.73/ppport.h:7787: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 octbuf[32] = "%123456789ABCDF";
data/libmath-prime-util-perl-0.73/ppport.h:7857:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
            char tmp[2];
data/libmath-prime-util-perl-0.73/prime_nth_count.c:73:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char byte_zeros[256] =
data/libmath-prime-util-perl-0.73/prime_nth_count.c:864:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char byte_sum[256] =
data/libmath-prime-util-perl-0.73/sieve.c:40:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char presieve13[PRESIEVE_SIZE] =
data/libmath-prime-util-perl-0.73/sieve.c:126: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, from);
data/libmath-prime-util-perl-0.73/sieve.c:129: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+from, dst, bytes);
data/libmath-prime-util-perl-0.73/sieve.c:144: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(mem, presieve13 + pstartd, tailbytes); /* Copy tail to mem */
data/libmath-prime-util-perl-0.73/sieve.c:149: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(mem, presieve13, (nbytes < PRESIEVE_SIZE) ? nbytes : PRESIEVE_SIZE);
data/libmath-prime-util-perl-0.73/sieve.c:161:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char masknum30[30] =
data/libmath-prime-util-perl-0.73/sieve.c:163:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char qinit30[30] =
data/libmath-prime-util-perl-0.73/sieve.c:309: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(mem, sieve+startd, endd-startd+1);
data/libmath-prime-util-perl-0.73/sieve.h:19:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char nextwheel30[30] = {
data/libmath-prime-util-perl-0.73/sieve.h:22:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char prevwheel30[30] = {
data/libmath-prime-util-perl-0.73/sieve.h:26:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char masktab30[30] = {
data/libmath-prime-util-perl-0.73/sieve.h:30:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char imask30[129] = {
data/libmath-prime-util-perl-0.73/sieve.h:36:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char distancewheel30[30] =
data/libmath-prime-util-perl-0.73/sieve.h:39:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char wheeladvance30[30] =
data/libmath-prime-util-perl-0.73/sieve.h:42:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char wheelretreat30[30] =
data/libmath-prime-util-perl-0.73/sieve.h:45:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char nextzero30[256] =
data/libmath-prime-util-perl-0.73/sieve.h:54:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const unsigned char clearprev30[30] =
data/libmath-prime-util-perl-0.73/sieve_cluster.c:39: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 rset[sprimes[NSMALLPRIMES-1]];
data/libmath-prime-util-perl-0.73/sieve_cluster.c:122: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 crem_0[43*47], crem_1[53*59], crem_2[61*67], **VPrem;
data/libmath-prime-util-perl-0.73/util.c:253: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 buf[8000+25];
data/libmath-prime-util-perl-0.73/util.c:1202: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(totlist, tlist, *ntotients * sizeof(UV));
data/libmath-prime-util-perl-0.73/util.c:2611:11:  [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(out, "%.*lf", (digits-1), 3.141592653589793238);
data/libmath-prime-util-perl-0.73/util.c:2796:19:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
int to_string_128(char str[40], IV hi, UV lo)
data/libmath-prime-util-perl-0.73/util.h:93:26:  [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.
extern int to_string_128(char s[40], IV hi, UV lo);
data/libmath-prime-util-perl-0.73/util.h:282:24:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
 static const unsigned char _debruijn64[64] = {
data/libmath-prime-util-perl-0.73/util.h:301:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   static const unsigned char _trail_debruijn32[32] = {
data/libmath-prime-util-perl-0.73/util.h:309:26:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
   static const unsigned char _lead_debruijn32[32] = {
data/libmath-prime-util-perl-0.73/chacha.c:242:25:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    uint32_t gen, len = strlen(expout) / 2;
data/libmath-prime-util-perl-0.73/ppport.h:5964:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));
data/libmath-prime-util-perl-0.73/ppport.h:5972:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define sv_vcatpvf(sv, pat, args)  sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libmath-prime-util-perl-0.73/ppport.h:5976:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define sv_vsetpvf(sv, pat, args)  sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*))
data/libmath-prime-util-perl-0.73/ppport.h:5997:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libmath-prime-util-perl-0.73/ppport.h:6026:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vcatpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libmath-prime-util-perl-0.73/ppport.h:6047:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     sv_vcatpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libmath-prime-util-perl-0.73/ppport.h:6070:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libmath-prime-util-perl-0.73/ppport.h:6099:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  sv_vsetpvfn(sv, pat, strlen(pat), &args, Null(SV**), 0, Null(bool*));
data/libmath-prime-util-perl-0.73/ppport.h:6120:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     sv_vsetpvfn(sv, pat, strlen(pat), args, Null(SV**), 0, Null(bool*));  \
data/libmath-prime-util-perl-0.73/ppport.h:6175:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
#  define HvNAMELEN_get(hv)              (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
data/libmath-prime-util-perl-0.73/ppport.h:7029:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        STRLEN len = strlen(radix);
data/libmath-prime-util-perl-0.73/ppport.h:7619:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return strlen(buffer);
data/libmath-prime-util-perl-0.73/ppport.h:7660:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    used = strlen(dst);
data/libmath-prime-util-perl-0.73/ppport.h:7661:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(src);
data/libmath-prime-util-perl-0.73/ppport.h:7691:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    length = strlen(src);
data/libmath-prime-util-perl-0.73/util.c:2707:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  len = strlen(s);
data/libmath-prime-util-perl-0.73/util.c:2710: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).
  for (i = 0, len = strlen(s); i < len; i++) {

ANALYSIS SUMMARY:

Hits = 91
Lines analyzed = 22283 in approximately 0.70 seconds (31611 lines/second)
Physical Source Lines of Code (SLOC) = 15087
Hits@level = [0]  57 [1]  18 [2]  66 [3]   0 [4]   7 [5]   0
Hits@level+ = [0+] 148 [1+]  91 [2+]  73 [3+]   7 [4+]   7 [5+]   0
Hits/KSLOC@level+ = [0+] 9.80977 [1+] 6.03168 [2+] 4.8386 [3+] 0.463976 [4+] 0.463976 [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.