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/mpb-1.10.0/mpb/epsilon.c
Examining data/mpb-1.10.0/mpb/epsilon_file.c
Examining data/mpb-1.10.0/mpb/field-smob.c
Examining data/mpb-1.10.0/mpb/field-smob.h
Examining data/mpb-1.10.0/mpb/fields.c
Examining data/mpb-1.10.0/mpb/material_grid.c
Examining data/mpb-1.10.0/mpb/material_grid_opt.c
Examining data/mpb-1.10.0/mpb/matrix-smob.c
Examining data/mpb-1.10.0/mpb/matrix-smob.h
Examining data/mpb-1.10.0/mpb/medium.c
Examining data/mpb-1.10.0/mpb/mpb.c
Examining data/mpb-1.10.0/mpb/mpb.h
Examining data/mpb-1.10.0/mpb/my-smob.h
Examining data/mpb-1.10.0/src/matrices/blasglue.c
Examining data/mpb-1.10.0/src/matrices/blasglue.h
Examining data/mpb-1.10.0/src/matrices/eigensolver.c
Examining data/mpb-1.10.0/src/matrices/eigensolver.h
Examining data/mpb-1.10.0/src/matrices/eigensolver_davidson.c
Examining data/mpb-1.10.0/src/matrices/eigensolver_utils.c
Examining data/mpb-1.10.0/src/matrices/evectmatrix.c
Examining data/mpb-1.10.0/src/matrices/linmin.c
Examining data/mpb-1.10.0/src/matrices/linmin.h
Examining data/mpb-1.10.0/src/matrices/matrices.c
Examining data/mpb-1.10.0/src/matrices/matrices.h
Examining data/mpb-1.10.0/src/matrices/minpack2-linmin.c
Examining data/mpb-1.10.0/src/matrices/scalar.h
Examining data/mpb-1.10.0/src/matrices/sqmatrix.c
Examining data/mpb-1.10.0/src/matrixio/evectmatrixio.c
Examining data/mpb-1.10.0/src/matrixio/fieldio.c
Examining data/mpb-1.10.0/src/matrixio/matrixio.c
Examining data/mpb-1.10.0/src/matrixio/matrixio.h
Examining data/mpb-1.10.0/src/maxwell/imaxwell.h
Examining data/mpb-1.10.0/src/maxwell/maxwell.c
Examining data/mpb-1.10.0/src/maxwell/maxwell.h
Examining data/mpb-1.10.0/src/maxwell/maxwell_constraints.c
Examining data/mpb-1.10.0/src/maxwell/maxwell_eps.c
Examining data/mpb-1.10.0/src/maxwell/maxwell_op.c
Examining data/mpb-1.10.0/src/maxwell/maxwell_pre.c
Examining data/mpb-1.10.0/src/maxwell/xyz_loop.h
Examining data/mpb-1.10.0/src/util/check.h
Examining data/mpb-1.10.0/src/util/debug_malloc.c
Examining data/mpb-1.10.0/src/util/mpi_utils.c
Examining data/mpb-1.10.0/src/util/mpi_utils.h
Examining data/mpb-1.10.0/src/util/mpiglue.h
Examining data/mpb-1.10.0/src/util/sphere-quad.c
Examining data/mpb-1.10.0/tests/blastest.c
Examining data/mpb-1.10.0/tests/eigs_test.c
Examining data/mpb-1.10.0/tests/malloctest.c
Examining data/mpb-1.10.0/tests/maxwell_test.c
Examining data/mpb-1.10.0/tests/normal_vectors.c
Examining data/mpb-1.10.0/utils/mpb-data.c

FINAL RESULTS:

data/mpb-1.10.0/mpb/fields.c:927:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(s, prefix ? prefix : "");
data/mpb-1.10.0/mpb/fields.c:928:6:  [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(s, fname ? fname : "");
data/mpb-1.10.0/mpb/fields.c:933:4:  [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(s, parity_string(d));
data/mpb-1.10.0/mpb/fields.c:1110:9:  [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(fname, comp_str);
data/mpb-1.10.0/mpb/fields.c:1250:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			      sprintf(dataname, "%s.%c%c",
data/mpb-1.10.0/mpb/mpb.c:324:4:  [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(s, (d->nz == 1) ? "te" : "zeven");
data/mpb-1.10.0/mpb/mpb.c:326:4:  [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(s, (d->nz == 1) ? "tm" : "zodd");
data/mpb-1.10.0/mpb/mpb.c:804:15:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     parity = strcpy(parity, parity_string(mdata));
data/mpb-1.10.0/src/matrices/minpack2-linmin.c:111:36:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
#define s_copy(s1, s2, len1, len2) strcpy(s1, s2)
data/mpb-1.10.0/src/matrixio/matrixio.c:320:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(new_fname, fname);
data/mpb-1.10.0/src/matrixio/matrixio.c:324:4:  [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(new_fname, FNAME_SUFFIX);
data/mpb-1.10.0/src/matrixio/matrixio.c:756:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(*dname, name);
data/mpb-1.10.0/src/matrixio/matrixio.c:801:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(dname, name);
data/mpb-1.10.0/src/util/mpi_utils.c:123:6:  [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, template, ap);
data/mpb-1.10.0/src/util/mpi_utils.c:144:10:  [4] (format) vprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
         vprintf(template, ap);
data/mpb-1.10.0/src/util/mpi_utils.c:156:4:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	  vfprintf(f, template, ap);
data/mpb-1.10.0/src/util/mpi_utils.h:38:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((format (printf, 1, 2)))
data/mpb-1.10.0/src/util/mpi_utils.h:44:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((format (printf, 2, 3)))
data/mpb-1.10.0/src/util/mpi_utils.h:50:30:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
     __attribute__ ((format (printf, 1, 2)))
data/mpb-1.10.0/utils/mpb-data.c:341:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
     strcpy(out_name, name_re);
data/mpb-1.10.0/utils/mpb-data.c:351:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(out_name, name_im);
data/mpb-1.10.0/utils/mpb-data.c:698:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	  strcpy(name_re, dname);
data/mpb-1.10.0/utils/mpb-data.c:703:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(name_re, "%s.r", dname);
data/mpb-1.10.0/utils/mpb-data.c:704:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	  sprintf(name_im, "%s.i", dname);
data/mpb-1.10.0/utils/mpb-data.c:770:11:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
          strcpy(filename, fname);
data/mpb-1.10.0/utils/mpb-data.c:810:20:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                   strcpy(out_fname, optarg);
data/mpb-1.10.0/utils/mpb-data.c:817:20:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
                   strcpy(data_name, optarg);
data/mpb-1.10.0/mpb/mpb.c:97:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	  char *senthread = getenv("OMP_NUM_THREADS");
data/mpb-1.10.0/mpb/mpb.c:452:4:  [3] (random) srand:
  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.
	  srand(time(NULL)); /* init random seed for field initialization */
data/mpb-1.10.0/mpb/mpb.c:459:4:  [3] (random) srand:
  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.
	  srand(314159 * (rank + 1));
data/mpb-1.10.0/tests/eigs_test.c:97:6:  [3] (random) srand:
  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.
     srand(argc >= 3 ? atoi(argv[2]) : time(NULL));
data/mpb-1.10.0/tests/malloctest.c:45:6:  [3] (random) srand:
  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.
     srand(time(NULL));
data/mpb-1.10.0/tests/maxwell_test.c:260:6:  [3] (random) srand:
  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.
     srand(time(NULL));
data/mpb-1.10.0/tests/maxwell_test.c:277:23:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
          while ((c = getopt(argc, argv, "hs:k:b:n:f:x:y:z:emt:c:g:1pvE:"))
data/mpb-1.10.0/tests/maxwell_test.c:285:4:  [3] (random) srand:
  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.
			srand(atoi(optarg));
data/mpb-1.10.0/tests/normal_vectors.c:171:6:  [3] (random) srand:
  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.
     srand(time(NULL));
data/mpb-1.10.0/utils/mpb-data.c:790:18:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
     while ((c = getopt(argc, argv, "hVvo:x:y:z:m:d:n:prTe:P:")) != -1)
data/mpb-1.10.0/mpb/field-smob.c:62:6:  [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[256];
data/mpb-1.10.0/mpb/field-smob.c:67:6:  [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(buf, "%dx%dx%d", pf->nx, pf->ny, pf->nz);
data/mpb-1.10.0/mpb/field-smob.c:81:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf, ", y=%d-%d local",
data/mpb-1.10.0/mpb/fields.c:1003:6:  [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 fname[100], *fname2, description[100];
data/mpb-1.10.0/mpb/fields.c:1105:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(fname, "%c.k%02d.b%02d",
data/mpb-1.10.0/mpb/fields.c:1112:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(description, "%c field, kpoint %d, band %d, freq=%g",
data/mpb-1.10.0/mpb/fields.c:1163:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(fname, "%c.k%02d.b%02d",
data/mpb-1.10.0/mpb/fields.c:1165:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(description, "%c field, kpoint %d, band %d, freq=%g",
data/mpb-1.10.0/mpb/fields.c:1214: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.
	       sprintf(fname, "epsilon");
data/mpb-1.10.0/mpb/fields.c:1215: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.
	       sprintf(description, "dielectric function, epsilon");
data/mpb-1.10.0/mpb/fields.c:1218: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.
	       sprintf(fname, "mu");
data/mpb-1.10.0/mpb/fields.c:1219: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.
	       sprintf(description, "permeability mu");
data/mpb-1.10.0/mpb/fields.c:1222: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.
	       sprintf(fname, "%cpwr.k%02d.b%02d",
data/mpb-1.10.0/mpb/fields.c:1224: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.
	       sprintf(description,
data/mpb-1.10.0/mpb/fields.c:1244: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 dataname[100];
data/mpb-1.10.0/mpb/fields.c:1264:8:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				   strcat(dataname, ".i");
data/mpb-1.10.0/mpb/fields.c:1266:8:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
				   strcat(dataname, ".screwy");
data/mpb-1.10.0/mpb/material_grid_opt.c:245:4:  [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 prefix[256];
data/mpb-1.10.0/mpb/matrix-smob.c:49:6:  [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[256];
data/mpb-1.10.0/mpb/matrix-smob.c:54:6:  [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(buf, "(%dx%d)x%d", pm->N, pm->c, pm->p);
data/mpb-1.10.0/mpb/matrix-smob.c:62:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf, ", (%dx%d)x%d local", pm->localN, pm->c, pm->p);
data/mpb-1.10.0/mpb/matrix-smob.c:90:6:  [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[256];
data/mpb-1.10.0/mpb/matrix-smob.c:95:6:  [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(buf, "%dx%d", pm->p, pm->p);
data/mpb-1.10.0/mpb/matrix-smob.c:103:4:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	  sprintf(buf, ", %dx%d alloc", pm->alloc_p, pm->alloc_p);
data/mpb-1.10.0/mpb/mpb.c:98:34:  [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 i, nthread = senthread ? (atoi(senthread) > 0
data/mpb-1.10.0/mpb/mpb.c:99:8:  [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).
					? atoi(senthread) : 1) : 1;
data/mpb-1.10.0/mpb/mpb.c:103: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).
		    CHECK((nthread=atoi((*argv)[i]+10)) > 0,
data/mpb-1.10.0/mpb/mpb.c:321: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.
     static char s[128];
data/mpb-1.10.0/mpb/mpb.c:328:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	  strcat(s, "yeven");
data/mpb-1.10.0/mpb/mpb.c:330:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	  strcat(s, "yodd");
data/mpb-1.10.0/src/matrices/linmin.c:76:4:  [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 task[300] = "START";
data/mpb-1.10.0/src/util/mpiglue.h:55:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
     memcpy((rb), (sb), (n) * sizeof(ctype)); \
data/mpb-1.10.0/tests/eigs_test.c:95:8:  [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).
	  n = atoi(argv[1]);
data/mpb-1.10.0/tests/eigs_test.c:97:24:  [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).
     srand(argc >= 3 ? atoi(argv[2]) : time(NULL));
data/mpb-1.10.0/tests/malloctest.c:31:6:  [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 *pointers[NUM_POINTERS];
data/mpb-1.10.0/tests/maxwell_test.c:285: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).
			srand(atoi(optarg));
data/mpb-1.10.0/tests/maxwell_test.c:291: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).
			num_bands = atoi(optarg);
data/mpb-1.10.0/tests/maxwell_test.c:304: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).
			nx = atoi(optarg);
data/mpb-1.10.0/tests/maxwell_test.c:308: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).
			ny = atoi(optarg);
data/mpb-1.10.0/tests/maxwell_test.c:312: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).
			nz = atoi(optarg);
data/mpb-1.10.0/tests/maxwell_test.c:333: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).
			mesh_size = atoi(optarg);
data/mpb-1.10.0/utils/mpb-data.c:250: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.
		    const char *name_re, const char *name_im,
data/mpb-1.10.0/utils/mpb-data.c:250:34:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		    const char *name_re, const char *name_im,
data/mpb-1.10.0/utils/mpb-data.c:261:6:  [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 out_name[1000];
data/mpb-1.10.0/utils/mpb-data.c:343:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	  strcat(out_name, "-new");
data/mpb-1.10.0/utils/mpb-data.c:353:9:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
	       strcat(out_name, "-new");
data/mpb-1.10.0/utils/mpb-data.c:534: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.
void handle_file(const char *fname, const char *out_fname,
data/mpb-1.10.0/utils/mpb-data.c:534:43:  [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.
void handle_file(const char *fname, const char *out_fname,
data/mpb-1.10.0/utils/mpb-data.c:535:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		 const char *data_name,
data/mpb-1.10.0/utils/mpb-data.c:546:6:  [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 datanames[NUM_DATANAMES][30] = {
data/mpb-1.10.0/utils/mpb-data.c:693:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	  char name_re[300], name_im[300];
data/mpb-1.10.0/mpb/fields.c:925: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).
		(fname ? strlen(fname) : 0) +
data/mpb-1.10.0/mpb/fields.c:926: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).
		(prefix ? strlen(prefix) : 0) + 20);
data/mpb-1.10.0/mpb/fields.c:932:4:  [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(s, ".");
data/mpb-1.10.0/mpb/mpb.c:322:6:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
     strcpy(s, "");
data/mpb-1.10.0/mpb/mpb.c:803:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     CHK_MALLOC(parity, char, strlen(parity_string(mdata)) + 1);
data/mpb-1.10.0/src/matrixio/matrixio.c:175: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).
     H5Tset_size(type_id, strlen(val) + 1);
data/mpb-1.10.0/src/matrixio/matrixio.c:312:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     int oldlen = strlen(fname);
data/mpb-1.10.0/src/matrixio/matrixio.c:313:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     int suflen = strlen(FNAME_SUFFIX);
data/mpb-1.10.0/src/matrixio/matrixio.c:755:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	  CHK_MALLOC(*dname, char, strlen(name) + 1);
data/mpb-1.10.0/src/matrixio/matrixio.c:800:28:  [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).
	  CHK_MALLOC(dname, char, strlen(name) + 1);
data/mpb-1.10.0/utils/mpb-data.c:757:18:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
     fname_len = strlen(fname);
data/mpb-1.10.0/utils/mpb-data.c:760: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).
          int colon_len = strlen(colon);
data/mpb-1.10.0/utils/mpb-data.c:763:11:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          strncpy(filename, fname, fname_len-colon_len+1);
data/mpb-1.10.0/utils/mpb-data.c:808:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                              (strlen(optarg) + 1));
data/mpb-1.10.0/utils/mpb-data.c:815:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
                                              (strlen(optarg) + 1));

ANALYSIS SUMMARY:

Hits = 103
Lines analyzed = 18375 in approximately 0.53 seconds (34999 lines/second)
Physical Source Lines of Code (SLOC) = 13228
Hits@level = [0] 167 [1]  15 [2]  51 [3]  10 [4]  27 [5]   0
Hits@level+ = [0+] 270 [1+] 103 [2+]  88 [3+]  37 [4+]  27 [5+]   0
Hits/KSLOC@level+ = [0+] 20.4112 [1+] 7.78651 [2+] 6.65256 [3+] 2.7971 [4+] 2.04112 [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.