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/infinipath-psm-3.3+20.604758e7/include/ipath_byteorder.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_debug.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_intf.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_queue.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_service.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h
Examining data/infinipath-psm-3.3+20.604758e7/include/ipath_user.h
Examining data/infinipath-psm-3.3+20.604758e7/include/linux-i386/bit_ops.h
Examining data/infinipath-psm-3.3+20.604758e7/include/linux-i386/sysdep.h
Examining data/infinipath-psm-3.3+20.604758e7/include/linux-ppc/bit_ops.h
Examining data/infinipath-psm-3.3+20.604758e7/include/linux-ppc/sysdep.h
Examining data/infinipath-psm-3.3+20.604758e7/include/valgrind/memcheck.h
Examining data/infinipath-psm-3.3+20.604758e7/include/valgrind/valgrind.h
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_dwordcpy-generic.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_dwordcpy-ppc64.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_dwordcpy-x86_64.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_i2cflash.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_syslog.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_utils.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-i386.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-ppc.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-ppc64.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-x86_64.c
Examining data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/clear.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/compare.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/copy.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/isnull.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/pack.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/parse.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/psm_uuid.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/psm_uuid.h
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/tst_uuid.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/unpack.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/unparse.c
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/uuid.h
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/uuidP.h
Examining data/infinipath-psm-3.3+20.604758e7/libuuid/uuid_time.c
Examining data/infinipath-psm-3.3+20.604758e7/mpspawn/mpspawn_stats.h
Examining data/infinipath-psm-3.3+20.604758e7/psm.c
Examining data/infinipath-psm-3.3+20.604758e7/psm.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_am.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_am.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_am_internal.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_context.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_context.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_diags.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_ep.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_ep_connect.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_error.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_error.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_help.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_lock.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_memcpy.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_mpool.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_mpool.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_mq.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_mq.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_mq_internal.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_mq_recv.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_mq_utils.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_noship.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_stats.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_stats.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_timer.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_timer.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_user.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_utils.h
Examining data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/kcopyrw.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/kcopyrwu.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/knemrw.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/knemrwu.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/psm_am_internal.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/ptl.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/ptl_fwd.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/scifrw.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_am/scifrwu.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_crc32.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_epstate.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_epstate.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_expected_proto.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_am.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_am.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_header.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_help.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_internal.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_mq.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_params.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_recvhdrq.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_recvhdrq.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_recvq.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_recvq.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_scb.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_scb.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_spio.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_spio.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_stats.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_subcontext.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_subcontext.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_tid.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_tid.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_tidflow.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_tidflow.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_writehdrq.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_writehdrq.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ipserror.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ipserror.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl_fwd.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl_ips.h
Examining data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl_rcvthread.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_self/ptl.c
Examining data/infinipath-psm-3.3+20.604758e7/ptl_self/ptl_fwd.h
Examining data/infinipath-psm-3.3+20.604758e7/psm_ep.c
Examining data/infinipath-psm-3.3+20.604758e7/psm_utils.c

FINAL RESULTS:

data/infinipath-psm-3.3+20.604758e7/include/ipath_service.h:130:25:  [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, 4, 5)));
data/infinipath-psm-3.3+20.604758e7/include/ipath_service.h:133:25:  [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, 3, 4)));
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:54:3:  [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.
		printf("%s%s: " fmt, __ipath_mylabel, __progname, \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:61:3:  [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.
		printf("%s%s: " fmt, __ipath_mylabel, __progname, \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:69:4:  [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.
			printf("%s%s: " fmt, __ipath_mylabel, __func__, \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:79:4:  [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(__ipath_dbgout, "%s%s: " fmt, __ipath_mylabel, __func__, \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:87:4:  [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(__ipath_dbgout, "%s" fmt, __ipath_mylabel, \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:108:3:  [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.
		printf ("%s" fmt, "", ##__VA_ARGS__); \
data/infinipath-psm-3.3+20.604758e7/include/ipath_udebug.h:113:3:  [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.
		printf ("%s" fmt, "", ##__VA_ARGS__); \
data/infinipath-psm-3.3+20.604758e7/include/ipath_user.h:233:28:  [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, 4, 5)));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:519:6:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	    snprintf(pathname, sizeof(pathname), QIB_CLASS_PATH"%d", i);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:145:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buf, sysfs_page_size, fmt, ap);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_syslog.c:67:2:  [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, format, ap_cons);
data/infinipath-psm-3.3+20.604758e7/libuuid/unparse.c:56:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out, fmt,
data/infinipath-psm-3.3+20.604758e7/psm_error.c:123:7:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
      vsnprintf(token.err_string, PSM_ERRSTRING_MAXLEN-1, fullmsg, argptr);
data/infinipath-psm-3.3+20.604758e7/psm_error.h:49:28:  [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, 3, 4)));
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2987:11:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    res = access(KNEM_DEVICE_FILENAME, R_OK | W_OK);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c:156:5:  [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(elid.key, eplid);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:244:5:  [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(elid.key, eplid);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:989: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.
      off += vsnprintf(buf, sizeof buf - off, msg, argptr);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:68:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((((e = getenv("PSC_MPI_RANK")) && *e)) ||
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:69:9:  [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.
	(((e = getenv("MPI_RANKID")) && *e)) ||
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:70:9:  [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.
	(((e = getenv("MPIRUN_RANK")) && *e)))
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:161:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(!getenv("IPATH_NO_BACKTRACE"))  {// permanent, although probably
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:174:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(!getenv("IPATH_NO_BACKTRACE"))  {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:189:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *fname = getenv("IPATH_DEBUG_FILENAME");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c:90:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(getenv("IPATH_NO_CPUAFFINITY")) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c:232:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if ((env = getenv("IPATH_HW_HEADER_SUPPRESSION")) && (*env != '\0')) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c:295:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	maxpio = getenv("IPATH_MAXPIO");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:113:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if(getenv("IPATH_NO_CPUAFFINITY")) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:118:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env = getenv("IPATH_SET_CPUAFFINITY");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:344:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      if ((env = getenv("IPATH_HW_HEADER_SUPPRESSION")) && (*env != '\0')) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:427:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	maxpio = getenv("IPATH_MAXPIO");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:650:5:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if(getenv("IPATH_DIAG_LID_LOOP")) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:62: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.
        sysfs_path = getenv("IPATH_SYSFS_PATH");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:75:24:  [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.
        ipathfs_path = getenv("IPATH_IPATHFS_PATH");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:216:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("IPATH_DEBUG_TIMEBASE"))
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_utils.c:588:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *env = getenv("IPATH_DISABLE_MMAP_MALLOC");
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:80:9:  [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.
#define srand(x) 	srandom(x)
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:80:19:  [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.
#define srand(x) 	srandom(x)
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:81:18:  [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 rand() 		random()
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:95:3:  [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((getpid() << 16) ^ getuid() ^ tv.tv_sec ^ tv.tv_usec);
data/infinipath-psm-3.3+20.604758e7/psm.c:184:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!getenv("PSM_NO_WARN")) 
data/infinipath-psm-3.3+20.604758e7/psm.c:189:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (!getenv("PSM_NO_WARN")) 
data/infinipath-psm-3.3+20.604758e7/psm.c:194:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_FI") && !getenv("PSM_NO_WARN")) 
data/infinipath-psm-3.3+20.604758e7/psm.c:194:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_FI") && !getenv("PSM_NO_WARN")) 
data/infinipath-psm-3.3+20.604758e7/psm.c:233:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *env = getenv("IPATH_DISABLE_MMAP_MALLOC");
data/infinipath-psm-3.3+20.604758e7/psm.c:247:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_IDENTIFY")) {
data/infinipath-psm-3.3+20.604758e7/psm.c:260:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_DIAGS")) {
data/infinipath-psm-3.3+20.604758e7/psm.c:422:25:  [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.
    return psmi_ptl_ips.getopt(component_obj, optname, optval, optlen);
data/infinipath-psm-3.3+20.604758e7/psm_context.c:632:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((c = getenv("MPI_LOCALRANKID")) && *c != '\0') { 
data/infinipath-psm-3.3+20.604758e7/psm_context.c:636:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    else if ((c = getenv("PSC_MPI_PPN")) && *c != '\0') { 
data/infinipath-psm-3.3+20.604758e7/psm_diags.c:93:5:  [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(12345678);
data/infinipath-psm-3.3+20.604758e7/psm_diags.c:250:3:  [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(seed);
data/infinipath-psm-3.3+20.604758e7/psm_diags.c:258:3:  [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(seed);
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:115:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env = getenv("PSM_MULTIRAIL");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:121:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    env = getenv("MPI_LOCALRANKID");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:133:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((env = getenv("PSM_MULTIRAIL_MAP"))) {
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:695:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	old_cpuaff = getenv("IPATH_NO_CPUAFFINITY");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:735: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.
	    old_unit = getenv("IPATH_UNIT");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:900:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (((e = getenv("MPI_RANKID")) != NULL && *e) ||
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:901:12:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    ((e = getenv("PSC_MPI_RANK")) != NULL && *e))
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1100:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CLOSE_TIMEOUT")) {
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1279:6:  [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.
	e = getenv("IPATH_NO_CPUAFFINITY");
data/infinipath-psm-3.3+20.604758e7/psm_ep_connect.c:103:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CONNECT_TIMEOUT")) {
data/infinipath-psm-3.3+20.604758e7/psm_error.c:129:9:  [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.
    c = getenv("PSM_NO_VERBOSE_ERRORS");
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:385:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *env = getenv("PSM_VERBOSE_ENV");
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:417:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    char *env = getenv(name);
data/infinipath-psm-3.3+20.604758e7/ptl.h:86:7:  [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.
    (*getopt)(const void *component_obj, int optname,
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:1750:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        char *p = getenv("PSM_SHM_POLITE_ATTACH");
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c:400:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  if (getenv("PSM_IDENTIFY")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:526:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CCTI_INCREMENT") || getenv("PSM_CCTI_TIMER") || getenv("PSM_CCTI_TABLE_SIZE")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:526:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CCTI_INCREMENT") || getenv("PSM_CCTI_TIMER") || getenv("PSM_CCTI_TABLE_SIZE")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:526:69:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CCTI_INCREMENT") || getenv("PSM_CCTI_TIMER") || getenv("PSM_CCTI_TABLE_SIZE")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:620:3:  [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(getpid());
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.c:471:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CLOSE_GRACE_PERIOD")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.c:499:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if (getenv("PSM_CLOSE_GRACE_INTERVAL")) {
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.c:627:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    if ((c = getenv("PSM_SDMA")) && *c && !strncmp("always", c, 7))
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_spio.c:150:24:  [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.
		ctrl->spio_copy_fn = getenv("IPATH_MIC_DWORD_PIO")?
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl.c:819:11:  [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()%(count+2)) == 0) {
data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h:589: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 if_serial[12];
data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h:591: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 if_mfgdate[8];
data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h:593: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 if_testdate[8];
data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h:599: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 if_comment[32];
data/infinipath-psm-3.3+20.604758e7/include/ipath_common.h:601: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 if_sprefix[4];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:59: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 lbl[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:60: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 hostname[80];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:89:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char buf[150], hname[64], fname[128];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:135:12:  [2] (misc) open:
  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((fd=open(fname, O_CREAT|O_WRONLY, 0644))>=0) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:190: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 *exph, *expp, tbuf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:201: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 hname[256], pid[12];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:206:5:  [2] (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 string.
				strcpy(hname, "[unknown]");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_debug.c:236: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).
	newf = fopen(fname, "a");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c:156: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(&c.cmd.user_info, u, sizeof(*u));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_proto.c:166: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(&c.cmd.user_info, u, sizeof(*u));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:122: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).
    CPU_SET(atoi(env), &cpuset);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:124:54:  [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).
	_IPATH_INFO("sched_setaffinity() failed, cpu %d\n", atoi(env));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:161: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(&c.cmd.user_info, u, sizeof(*u));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_protomic.c:280: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(&c.cmd.user_info, u, sizeof(*u));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:231: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 dev_name[MAXPATHLEN];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:241:15:  [2] (misc) open:
  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 ((fd = open(dev_name, O_RDWR)) == -1) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:295: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 dev_name[MAXPATHLEN];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:308:15:  [2] (misc) open:
  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 ((fd = open(dev_name, O_RDWR)) == -1) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:513: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 pathname[128];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:854: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 sl2vlpath[16];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1123: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 buf[32];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1163: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(ccabuf,
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1166:10:  [2] (misc) open:
  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).
    fd = open(ccabuf, O_RDONLY);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1220: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 pathname[256];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1223: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(pathname,
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1226:10:  [2] (misc) open:
  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).
    fd = open(pathname, O_RDONLY);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:64: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.
	static char syspath[64];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:105:10:  [2] (misc) open:
  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).
    fd = open(buf, flags);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:120:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:125:10:  [2] (misc) open:
  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).
    fd = open(buf, flags);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:204:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:217:10:  [2] (misc) open:
  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).
    fd = open(buf, flags);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:234:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:247:10:  [2] (misc) open:
  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).
    fd = open(buf, flags);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:263:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:267:10:  [2] (misc) open:
  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).
    fd = open(buf, flags);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_syslog.c:52: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 logprefix[SYSLOG_MAXLEN];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_syslog.c:55: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 hostname[80];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:212: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 hostname[80];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:225: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).
      	FILE *fp = fopen("/proc/cpuinfo","r");
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:226:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      	char input[255];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:252: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 buf[256];
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:269:12:  [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 ((fp = fopen(buf, "r"))) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_utils.c:311: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((char *) (unsigned long) req->addr, data + req->offset,
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_utils.c:332: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(data + req->offset, (char *) (unsigned long) req->addr,
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-x86_64.c:174: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((uint32_t *)piob, pbc, IPATH_MESSAGE_HDR_SIZE+8);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_write_pio-x86_64.c:178: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((uint32_t *)piob, (uint32_t*)bdata, pioparm->length);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:92:8:  [2] (misc) open:
  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).
		fd = open("/dev/urandom", O_RDONLY);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:94:9:  [2] (misc) open:
  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).
			fd = open("/dev/random", O_RDONLY | O_NONBLOCK);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:146: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 buf[1024];
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:212:4:  [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(node_id, a, 6);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:270:18:  [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 unsigned char node_id[6];
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:291:2:  [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(uu.node, node_id, 6);
data/infinipath-psm-3.3+20.604758e7/libuuid/pack.c:68:2:  [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(out+10, uu->node, 6);
data/infinipath-psm-3.3+20.604758e7/libuuid/parse.c:48: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		buf[3];
data/infinipath-psm-3.3+20.604758e7/libuuid/tst_uuid.c:42:15:  [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 char * validStr[2] = {"invalid", "valid"};
data/infinipath-psm-3.3+20.604758e7/libuuid/tst_uuid.c:61: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		str[100];
data/infinipath-psm-3.3+20.604758e7/libuuid/unpack.c:62:2:  [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(uu->node, ptr, 6);
data/infinipath-psm-3.3+20.604758e7/libuuid/uuid.h:43:18:  [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.
typedef unsigned char uuid_t[16];
data/infinipath-psm-3.3+20.604758e7/psm.h:991: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 uuid_str[64];	/* String representation of the UUID for this end-point */
data/infinipath-psm-3.3+20.604758e7/psm_am.c:166: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(parameters, &params, s);
data/infinipath-psm-3.3+20.604758e7/psm_context.c:160: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 dev_name[MAXPATHLEN];
data/infinipath-psm-3.3+20.604758e7/psm_context.c:278: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 buf[192];
data/infinipath-psm-3.3+20.604758e7/psm_diags.c:193:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:116: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).
    if (!env || atoi(env) == 0) {
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:122: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).
    if (!env || atoi(env) == 0) {
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:361:2:  [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(array_of_epinfo[i].uuid, 
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:595:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128], *p, *e;
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:705: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 pathname[128];
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:713: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).
	!(fp = fopen(pathname, "r")) || (fscanf(fp, "%d", &opts.unit) != 1)) {
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:732: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[32];
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:816: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(&ep->key, (void *) unique_job_key, sizeof(psm_uuid_t));
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:902:54:  [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).
	len = snprintf(p, sizeof buf - strlen(buf), ":%d.", atoi(e));
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:981: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 uvalue[4], pvalue[6];
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1366:11:  [2] (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 string.
		b_new = strcpy(b_new, "self,");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1370:3:  [2] (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 string.
		strcpy(b_new, "amsh,");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1374:3:  [2] (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 string.
		strcpy(b_new, "ips,");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1379:3:  [2] (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 string.
		strcpy(b_new, "amsh,");
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1384:3:  [2] (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 string.
		strcpy(b_new, "ips,");
data/infinipath-psm-3.3+20.604758e7/psm_ep_connect.c:214: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 errbuf[PSM_ERRSTRING_MAXLEN];
data/infinipath-psm-3.3+20.604758e7/psm_error.c:42: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	err_string[PSM_ERRSTRING_MAXLEN];
data/infinipath-psm-3.3+20.604758e7/psm_error.c:118: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 *c, fullmsg[PSM_ERRSTRING_MAXLEN];
data/infinipath-psm-3.3+20.604758e7/psm_help.h:134:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
                char errmsg[64];                                    \
data/infinipath-psm-3.3+20.604758e7/psm_mq.c:135: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(vdest, vsrc, nchars);
data/infinipath-psm-3.3+20.604758e7/psm_mq.c:639: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(stats, &mq->stats, sizeof(psm_mq_stats_t));
data/infinipath-psm-3.3+20.604758e7/psm_mq.c:680:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/infinipath-psm-3.3+20.604758e7/psm_mq_internal.h:61: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 _redzone[PSM_VALGRIND_REDZONE_SZ];
data/infinipath-psm-3.3+20.604758e7/psm_mq_utils.c:373: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 *desc[8];
data/infinipath-psm-3.3+20.604758e7/psm_noship.h:43: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 uuid_str[64];
data/infinipath-psm-3.3+20.604758e7/psm_stats.c:147:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/infinipath-psm-3.3+20.604758e7/psm_stats.c:278:20:  [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.
	mp_add.desc[i] = (char *) entries[i].desc;
data/infinipath-psm-3.3+20.604758e7/psm_stats.c:435:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[128];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:255:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char hostname[80] = {'\0'};
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:306:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char hostnamebufs[4][PSMI_EP_HOSTNAME_LEN];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:335:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char hostnamebufs[4][PSMI_EP_HOSTNAME_LEN];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:716:2:  [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(&addr, he->h_addr, sizeof(uint32_t));
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:733: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 uuid_str[64];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:826: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				spec_name[PSMI_FAULTINJ_SPEC_NAMELEN];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:885: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 buf[192];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:894:7:  [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).
	fp = fopen(buf, append ? "a" : "w");
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:956: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 fvals_str[128];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:957: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 fname[128];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:958: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 fdesc[300];
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:1121: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(newa, string, len); /* copy with \0 */
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:1152:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char err_string[256];
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:499: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 ccabuf[256];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:232:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char shm_errmsg[256];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:326: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 shmbuf[256];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:348: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(&ep->amsh_keyno, ep->key, sizeof(psm_uuid_t));
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:1568: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 buf[32];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:1751: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).
        if (p && *p && atoi(p) != 0) {
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2224: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((void*)pkt, &lcl_pkt, sizeof(am_pkt_short_t));
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2250:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char amsh_medscratch[AMMED_SZ];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2254:29:  [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 amsh_shm_copy_short memcpy
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2255:29:  [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 amsh_shm_copy_long  memcpy
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2869: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 path[128];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2882:7:  [2] (misc) open:
  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).
	fd = open(path, O_WRONLY | O_EXCL);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2896: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 path[128];
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:2905:7:  [2] (misc) open:
  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).
	fd = open(path, O_WRONLY);
data/infinipath-psm-3.3+20.604758e7/ptl_am/knemrwu.c:52:8:  [2] (misc) open:
  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).
  fd = open(KNEM_DEVICE_FILENAME, O_RDWR);
data/infinipath-psm-3.3+20.604758e7/ptl_am/psm_am_internal.h:444: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            _pad0[64-sizeof(pthread_mutex_t)];
data/infinipath-psm-3.3+20.604758e7/ptl_am/psm_am_internal.h:446: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            _pad1[64-sizeof(int)];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c:55: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 eplid[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c:376: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 hcaName[32];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:172: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 eplid[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:520: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 ccabuf[256];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:540: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(&proto->ccti_portctrl, p, 2); p += 2;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:541: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(&proto->ccti_ctrlmap, p, 2); p += 2;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:544:2:  [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(&proto->cace[i].ccti_timer_cycles, p, 2); p += 2;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto.c:428: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 ipbuf[INET_ADDRSTRLEN], *p;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:101: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	hostname[128];	    /* always NULL-terminated */
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:306:2:  [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(ipsaddr->epaddr->mctxt_gidhi, p, count*sizeof(uint64_t));
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:308:2:  [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(ipsaddr->epaddr->mctxt_epid, p, count*sizeof(psm_epid_t));
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:382: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(&hdr->uuid, &proto->ep->key, sizeof(psm_uuid_t));
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:776:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[IPS_MAX_CONNECT_PAYLEN] PSMI_CACHEALIGN;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:996:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[IPS_MAX_CONNECT_PAYLEN] PSMI_CACHEALIGN;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:1076: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 ep_key[37], req_key[37];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:1140:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[IPS_MAX_CONNECT_PAYLEN] PSMI_CACHEALIGN;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:1423:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[IPS_MAX_CONNECT_PAYLEN] PSMI_CACHEALIGN;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c:151: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(d+dlen, s, slen);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c:187:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char err_stat_msg[2048];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c:188: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 tmp_buf[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:983:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:1006:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:1444:2:  [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(bufptr, tidsendc->buffer, tidsendc->remaining_bytes);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:2200: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 buf[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:2242: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 pktmsg[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_expected.c:2243:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char errmsg[256];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_mq.c:333: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(vdest, vsrc, nchars);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:100: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 ipbuf[INET_ADDRSTRLEN], *ip = NULL;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:101: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 bufpid[32];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:887: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 ipbuf[INET_ADDRSTRLEN], *p;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:907:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[32];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:1116: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 ipbuf[INET_ADDRSTRLEN], *ip = NULL;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_recv.c:1223: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 pktmsg[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_spio.c:186:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_spio.c:194: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 bufctr[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ipserror.c:43:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char err_str[128];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl_rcvthread.c:180:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[192];
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ptl_rcvthread.c:396: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(&ratio_u, &ratio, sizeof(uint64_t));
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1171:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, ccabuf, 84) != 84) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1231:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, &ccti_limit, 2) != 2) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_service.c:1249:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (read(fd, cct, i) != i) {
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:72: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).
    sysfs_path_len = strlen(sysfs_path);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:209:15:  [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 = l = strlen(buf) - 1;
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:239:15:  [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 = l = strlen(buf) - 1;
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:360:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(fd, data, sysfs_page_size);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:585:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(fd, buf, n);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_sysfs.c:608:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ret = read(fd, buf, n);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_syslog.c:58:15:  [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 len = strlen(format);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_time.c:154:2:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	usleep(125);
data/infinipath-psm-3.3+20.604758e7/ipath/ipath_utils.c:494: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).
	int i, ret = -1, len = strlen(attr);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:116:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			i = read(fd, cp, n);
data/infinipath-psm-3.3+20.604758e7/libuuid/gen_uuid.c:183:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
data/infinipath-psm-3.3+20.604758e7/libuuid/parse.c:50: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).
	if (strlen(in) != 36)
data/infinipath-psm-3.3+20.604758e7/psm_context.c:146: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).
	size_t c = strlen(buf);
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:894:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(buf, psmi_gethostname(), sizeof(buf) - 1);
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:897:15:  [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).
    p = buf + strlen(buf);
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:902:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = snprintf(p, sizeof buf - strlen(buf), ":%d.", atoi(e));
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:904:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = snprintf(p, sizeof buf - strlen(buf), ":%d.%d.", 
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1341:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(devstring)+1;
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1352:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(e, devstring, len);
data/infinipath-psm-3.3+20.604758e7/psm_ep.c:1397:8:  [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).
	b_new[strlen(b_new) - 1] = '\0';
data/infinipath-psm-3.3+20.604758e7/psm_stats.c:159:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(buf, b, len);
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:291:38:  [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).
    hlen = min(PSMI_EP_HOSTNAME_LEN, strlen(hostname)+1);
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:587:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(buf, b, len);
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:933:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(fi->spec_name, spec_name, PSMI_FAULTINJ_SPEC_NAMELEN-1);
data/infinipath-psm-3.3+20.604758e7/psm_utils.c:1117: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).
    size_t len = strlen(string)+1;
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:323:35:  [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).
		} else cmd.cmd.mic_info.data2 = strlen(name);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:333: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).
			ret = psmd_scif_send(name, strlen(name)+1);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:383:35:  [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).
		} else cmd.cmd.mic_info.data2 = strlen(name);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:393: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).
			ret = psmd_scif_send(name, strlen(name)+1);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:444:35:  [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).
		} else cmd.cmd.mic_info.data2 = strlen(name);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:454: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).
			ret = psmd_scif_send(name, strlen(name)+1);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:560:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		else cmd.cmd.mic_info.data2 = strlen(data);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:569: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).
			ret = psmd_scif_send(data, strlen(data)+1);
data/infinipath-psm-3.3+20.604758e7/psmd/psmd.c:645:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(0);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:239:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (write(2, shm_errmsg, strlen(shm_errmsg)+1) == -1)
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:349:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
        strncpy(shmbuf, "/psm_shm.", sizeof shmbuf);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:350: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).
        p = shmbuf + strlen(shmbuf);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:459:17:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
                usleep(1); /* be gentle in tight fstat loop */
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:552:6:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
	    usleep(1);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:1181:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(100000);
data/infinipath-psm-3.3+20.604758e7/ptl_am/am_reqrep_shmem.c:1183:13:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
            usleep(250000);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_opp_path_rec.c:82:53:  [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).
    elid.key = psmi_calloc(proto->ep, UNDEFINED, 1, strlen(eplid) + 1);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_path_rec.c:181:53:  [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).
    elid.key = psmi_calloc(proto->ep, UNDEFINED, 1, strlen(eplid) + 1);
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_connect.c:407:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy(req->hostname, psmi_gethostname(),
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c:144:16:  [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 dlen = strlen(d), slen, max;
data/infinipath-psm-3.3+20.604758e7/ptl_ips/ips_proto_dump.c:147: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).
    slen = strlen(s);

ANALYSIS SUMMARY:

Hits = 295
Lines analyzed = 51847 in approximately 1.43 seconds (36221 lines/second)
Physical Source Lines of Code (SLOC) = 34343
Hits@level = [0] 214 [1]  49 [2] 166 [3]  60 [4]  20 [5]   0
Hits@level+ = [0+] 509 [1+] 295 [2+] 246 [3+]  80 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 14.8211 [1+] 8.58981 [2+] 7.16303 [3+] 2.32944 [4+] 0.58236 [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.