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/libpsm2-11.2.185/compat/psm-compat.c
Examining data/libpsm2-11.2.185/include/linux-i386/bit_ops.h
Examining data/libpsm2-11.2.185/include/linux-i386/sysdep.h
Examining data/libpsm2-11.2.185/include/opa_byteorder.h
Examining data/libpsm2-11.2.185/include/opa_debug.h
Examining data/libpsm2-11.2.185/include/opa_intf.h
Examining data/libpsm2-11.2.185/include/opa_queue.h
Examining data/libpsm2-11.2.185/include/opa_revision.h
Examining data/libpsm2-11.2.185/include/opa_service.h
Examining data/libpsm2-11.2.185/include/opa_udebug.h
Examining data/libpsm2-11.2.185/include/opa_user.h
Examining data/libpsm2-11.2.185/include/psm2_mock_testing.h
Examining data/libpsm2-11.2.185/include/rbtree.c
Examining data/libpsm2-11.2.185/include/rbtree.h
Examining data/libpsm2-11.2.185/libuuid/compare.c
Examining data/libpsm2-11.2.185/libuuid/pack.c
Examining data/libpsm2-11.2.185/libuuid/parse.c
Examining data/libpsm2-11.2.185/libuuid/psm_uuid.c
Examining data/libpsm2-11.2.185/libuuid/psm_uuid.h
Examining data/libpsm2-11.2.185/libuuid/unpack.c
Examining data/libpsm2-11.2.185/libuuid/unparse.c
Examining data/libpsm2-11.2.185/mpspawn/mpspawn_stats.h
Examining data/libpsm2-11.2.185/opa/opa_debug.c
Examining data/libpsm2-11.2.185/opa/opa_dwordcpy-generic.c
Examining data/libpsm2-11.2.185/opa/opa_dwordcpy-x86_64.c
Examining data/libpsm2-11.2.185/opa/opa_service.c
Examining data/libpsm2-11.2.185/opa/opa_sysfs.c
Examining data/libpsm2-11.2.185/opa/opa_syslog.c
Examining data/libpsm2-11.2.185/opa/opa_time.c
Examining data/libpsm2-11.2.185/opa/opa_utils.c
Examining data/libpsm2-11.2.185/opa/opa_write_pio-i386.c
Examining data/libpsm2-11.2.185/opa/opa_write_pio-x86_64.c
Examining data/libpsm2-11.2.185/psm.c
Examining data/libpsm2-11.2.185/psm2.h
Examining data/libpsm2-11.2.185/psm2_am.h
Examining data/libpsm2-11.2.185/psm2_hal.c
Examining data/libpsm2-11.2.185/psm2_hal.h
Examining data/libpsm2-11.2.185/psm2_hal_inline_t.h
Examining data/libpsm2-11.2.185/psm2_mq.h
Examining data/libpsm2-11.2.185/psm_am.c
Examining data/libpsm2-11.2.185/psm_am_internal.h
Examining data/libpsm2-11.2.185/psm_config.h
Examining data/libpsm2-11.2.185/psm_context.c
Examining data/libpsm2-11.2.185/psm_context.h
Examining data/libpsm2-11.2.185/psm_diags.c
Examining data/libpsm2-11.2.185/psm_ep.c
Examining data/libpsm2-11.2.185/psm_ep.h
Examining data/libpsm2-11.2.185/psm_ep_connect.c
Examining data/libpsm2-11.2.185/psm_error.c
Examining data/libpsm2-11.2.185/psm_error.h
Examining data/libpsm2-11.2.185/psm_gdrcpy.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/hfi1_deprecated_gen1.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_common_gen1.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_i2cflash_gen1.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_proto_gen1.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/opa_utils_gen1.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_gdrcpy.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.c
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.h
Examining data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h
Examining data/libpsm2-11.2.185/psm_help.h
Examining data/libpsm2-11.2.185/psm_lock.h
Examining data/libpsm2-11.2.185/psm_log.h
Examining data/libpsm2-11.2.185/psm_memcpy.c
Examining data/libpsm2-11.2.185/psm_mock.c
Examining data/libpsm2-11.2.185/psm_mpool.c
Examining data/libpsm2-11.2.185/psm_mpool.h
Examining data/libpsm2-11.2.185/psm_mq.c
Examining data/libpsm2-11.2.185/psm_mq_internal.h
Examining data/libpsm2-11.2.185/psm_mq_recv.c
Examining data/libpsm2-11.2.185/psm_mq_utils.c
Examining data/libpsm2-11.2.185/psm_perf.c
Examining data/libpsm2-11.2.185/psm_perf.h
Examining data/libpsm2-11.2.185/psm_stats.c
Examining data/libpsm2-11.2.185/psm_stats.h
Examining data/libpsm2-11.2.185/psm_sysbuf.c
Examining data/libpsm2-11.2.185/psm_sysbuf.h
Examining data/libpsm2-11.2.185/psm_timer.c
Examining data/libpsm2-11.2.185/psm_timer.h
Examining data/libpsm2-11.2.185/psm_user.h
Examining data/libpsm2-11.2.185/psm_utils.c
Examining data/libpsm2-11.2.185/psm_utils.h
Examining data/libpsm2-11.2.185/psmi_wrappers.c
Examining data/libpsm2-11.2.185/psmi_wrappers.h
Examining data/libpsm2-11.2.185/ptl.h
Examining data/libpsm2-11.2.185/ptl_am/am_config.h
Examining data/libpsm2-11.2.185/ptl_am/am_cuda_memhandle_cache.c
Examining data/libpsm2-11.2.185/ptl_am/am_cuda_memhandle_cache.h
Examining data/libpsm2-11.2.185/ptl_am/am_reqrep.c
Examining data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c
Examining data/libpsm2-11.2.185/ptl_am/cmarw.h
Examining data/libpsm2-11.2.185/ptl_am/cmarwu.c
Examining data/libpsm2-11.2.185/ptl_am/psm_am_internal.h
Examining data/libpsm2-11.2.185/ptl_am/ptl.c
Examining data/libpsm2-11.2.185/ptl_am/ptl_fwd.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_config.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_crc32.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_epstate.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_epstate.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_expected_proto.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_path_rec.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_am.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_am.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_connect.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_dump.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_header.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_help.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_internal.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_mq.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_params.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_proto_recv.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_recvhdrq.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_recvhdrq.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_recvq.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_recvq.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_scb.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_scb.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_stats.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_subcontext.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_tid.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_tid.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_tidcache.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_tidcache.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_tidflow.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_tidflow.h
Examining data/libpsm2-11.2.185/ptl_ips/ips_writehdrq.c
Examining data/libpsm2-11.2.185/ptl_ips/ips_writehdrq.h
Examining data/libpsm2-11.2.185/ptl_ips/ptl.c
Examining data/libpsm2-11.2.185/ptl_ips/ptl_fwd.h
Examining data/libpsm2-11.2.185/ptl_ips/ptl_ips.h
Examining data/libpsm2-11.2.185/ptl_ips/ptl_rcvthread.c
Examining data/libpsm2-11.2.185/ptl_self/ptl.c
Examining data/libpsm2-11.2.185/ptl_self/ptl_fwd.h

FINAL RESULTS:

data/libpsm2-11.2.185/include/opa_udebug.h:78: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, __hfi_mylabel, __progname, \
data/libpsm2-11.2.185/include/opa_udebug.h:85: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, __hfi_mylabel, __progname, \
data/libpsm2-11.2.185/include/opa_udebug.h:93: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, __hfi_mylabel, __func__, \
data/libpsm2-11.2.185/include/opa_udebug.h:103: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(__hfi_dbgout, "%s%s: " fmt, __hfi_mylabel, __func__, \
data/libpsm2-11.2.185/include/opa_udebug.h:111: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(__hfi_dbgout, "%s" fmt, __hfi_mylabel, \
data/libpsm2-11.2.185/include/opa_udebug.h:140:3:  [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(__hfi_dbgout, "%s" fmt, __hfi_mylabel, \
data/libpsm2-11.2.185/include/opa_udebug.h:160: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/libpsm2-11.2.185/include/opa_udebug.h:165: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/libpsm2-11.2.185/include/opa_user.h:213: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/libpsm2-11.2.185/libuuid/unparse.c:55:2:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
	sprintf(out, fmt,
data/libpsm2-11.2.185/opa/opa_syslog.c:89:3:  [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/libpsm2-11.2.185/psm.c:568:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(strcat(ofed_delta," built for OFED DELTA "),psmi_hfi_IFS_version);
data/libpsm2-11.2.185/psm.c:788: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(networkType,intelopa);
data/libpsm2-11.2.185/psm_context.c:206:2:  [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(affinity_shm_name, shm_name_len,
data/libpsm2-11.2.185/psm_context.c:343:2:  [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(sem_affinity_shm_rw_name, sem_len,
data/libpsm2-11.2.185/psm_error.c:152:2:  [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, PSM2_ERRSTRING_MAXLEN - 1, fullmsg, argptr);
data/libpsm2-11.2.185/psm_error.h:72:32:  [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/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:324:3:  [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), HFI_DEVICE_PATH_GEN1 "_%d", ret);
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.h:258: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/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.h:260: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/libpsm2-11.2.185/psm_utils.c:2063:2:  [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(p,buf);
data/libpsm2-11.2.185/psm_utils.c:2359:12:  [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.
		length = vsnprintf(psmi_log_io_info.buff + psmi_log_io_info.curr_buff_length,
data/libpsm2-11.2.185/psm_utils.c:2467:25:  [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.
#define MY_FPRINTF      fprintf
data/libpsm2-11.2.185/psm_utils.c:2468:25:  [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.
#define MY_VFPRINTF     vfprintf
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:194:3:  [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/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:496:2:  [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/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:368:3:  [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/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:501:2:  [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/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:992:9:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	off += vsnprintf(buf, sizeof(buf) - off, msg, argptr);
data/libpsm2-11.2.185/opa/opa_debug.c:123:36:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *hfi_brake_file_name = getenv("HFI_BRAKE_FILE_NAME");
data/libpsm2-11.2.185/opa/opa_debug.c:150:13:  [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/libpsm2-11.2.185/opa/opa_debug.c:151:13:  [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/libpsm2-11.2.185/opa/opa_debug.c:152:13:  [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/libpsm2-11.2.185/opa/opa_debug.c:276: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.
	if (getenv("HFI_BACKTRACE")) {
data/libpsm2-11.2.185/opa/opa_debug.c:293: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("HFI_DEBUG_FILENAME");
data/libpsm2-11.2.185/opa/opa_debug.c:363: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("HFI_BACKTRACE")) {
data/libpsm2-11.2.185/opa/opa_sysfs.c:79:28:  [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 (NULL != (sysfs_path = getenv("HFI_SYSFS_PATH")))
data/libpsm2-11.2.185/opa/opa_sysfs.c:131: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.
		hfifs_path = getenv("HFI_HFIFS_PATH");
data/libpsm2-11.2.185/opa/opa_time.c:243: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.
	if (getenv("HFI_DEBUG_TIMEBASE"))
data/libpsm2-11.2.185/opa/opa_utils.c:144: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("HFI_DISABLE_MMAP_MALLOC");
data/libpsm2-11.2.185/psm.c:417: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("PSM2_NO_WARN"))
data/libpsm2-11.2.185/psm.c:423: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("PSM2_NO_WARN"))
data/libpsm2-11.2.185/psm.c:430: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.
	if (getenv("PSM2_FI") && !getenv("PSM2_NO_WARN"))
data/libpsm2-11.2.185/psm.c:430:28:  [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("PSM2_FI") && !getenv("PSM2_NO_WARN"))
data/libpsm2-11.2.185/psm.c:494: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.
		char *env = getenv("HFI_DISABLE_MMAP_MALLOC");
data/libpsm2-11.2.185/psm.c:528: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.
	if (getenv("PSM2_DIAGS")) {
data/libpsm2-11.2.185/psm.c:565: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.
	if (getenv("PSM2_IDENTIFY")) {
data/libpsm2-11.2.185/psm.c:1057:21:  [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.
		rv = psmi_ptl_ips.getopt(component_obj, optname, optval,
data/libpsm2-11.2.185/psm_context.c:129: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.
	const char *env_val = getenv(env);
data/libpsm2-11.2.185/psm_ep.c:164:13:  [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("PSM2_MULTIRAIL_MAP"))) {
data/libpsm2-11.2.185/psm_ep.c:957: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.
	if (((e = getenv("MPI_RANKID")) != NULL && *e) ||
data/libpsm2-11.2.185/psm_ep.c:958: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/libpsm2-11.2.185/psm_ep.c:1210: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.
	if (getenv("PSM2_CLOSE_TIMEOUT")) {
data/libpsm2-11.2.185/psm_ep_connect.c:149: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.
	if (getenv("PSM2_CONNECT_TIMEOUT")) {
data/libpsm2-11.2.185/psm_ep_connect.c:431: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.
	if (getenv("PSM2_DISCONNECT_TIMEOUT")) {
data/libpsm2-11.2.185/psm_error.c:158: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.
	c = getenv("PSM2_NO_VERBOSE_ERRORS");
data/libpsm2-11.2.185/psm_hal_gen1/opa_proto_gen1.c:438: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.
	if (getenv("HFI_FORCE_CPUAFFINITY") ||
data/libpsm2-11.2.185/psm_hal_gen1/opa_proto_gen1.c:440: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.
		!(getenv("HFI_NO_CPUAFFINITY") || skip_affinity)))
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:456: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("HFI_DIAG_LID_LOOP")) {
data/libpsm2-11.2.185/psm_hal_gen1/opa_utils_gen1.c:155:13:  [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("PSM2_SELINUX")) {
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h:413: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.
	if ((c = getenv("MPI_LOCALRANKID")) && *c != '\0') {
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h:416: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.
	} else if ((c = getenv("PSC_MPI_PPN")) && *c != '\0') {
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h:585: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("PSM2_IDENTIFY")) {
data/libpsm2-11.2.185/psm_perf.c:179: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.
    env_type = getenv("RDPMC_PERF_TYPE");
data/libpsm2-11.2.185/psm_perf.c:190: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.
    env_config = getenv("RDPMC_PERF_CONFIG");
data/libpsm2-11.2.185/psm_utils.c:425: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.
		char *env = getenv("PSM2_VERBOSE_ENV");
data/libpsm2-11.2.185/psm_utils.c:459: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(name);
data/libpsm2-11.2.185/psm_utils.c:2090: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.
			const char *env = getenv("PSM2_LOG_FILENAME");
data/libpsm2-11.2.185/psm_utils.c:2093: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.
			env = getenv("PSM2_LOG_SRCH_FORMAT_STRING");
data/libpsm2-11.2.185/psm_utils.c:2100: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("PSM2_LOG_INC_FUNCTION_NAMES");
data/libpsm2-11.2.185/psm_utils.c:2105: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("PSM2_LOG_EXC_FUNCTION_NAMES");
data/libpsm2-11.2.185/ptl.h:107:8:  [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/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:1293:13:  [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("PSM2_SHM_POLITE_ATTACH");
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:552: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.
	if (getenv("PSM2_IDENTIFY")) {
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:688: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("PSM2_CCTI_INCREMENT") || getenv("PSM2_CCTI_TIMER")
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:688:40:  [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("PSM2_CCTI_INCREMENT") || getenv("PSM2_CCTI_TIMER")
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:689: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.
		    || getenv("PSM2_CCTI_TABLE_SIZE")) {
data/libpsm2-11.2.185/ptl_ips/ips_proto.c:306: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.
	if (getenv("PSM2_SELINUX"))
data/libpsm2-11.2.185/ptl_ips/ips_proto.c:797: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.
	if (getenv("PSM2_CLOSE_GRACE_PERIOD")) {
data/libpsm2-11.2.185/ptl_ips/ips_proto.c:822: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.
	if (getenv("PSM2_CLOSE_GRACE_INTERVAL")) {
data/libpsm2-11.2.185/libuuid/pack.c:67: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/libpsm2-11.2.185/libuuid/parse.c:46: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/libpsm2-11.2.185/libuuid/psm_uuid.c:88: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("/dev/urandom", O_RDONLY);
data/libpsm2-11.2.185/libuuid/psm_uuid.h:66: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/libpsm2-11.2.185/libuuid/unpack.c:61: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/libpsm2-11.2.185/opa/opa_debug.c:122: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/libpsm2-11.2.185/opa/opa_debug.c:141: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 lbl[1024];
data/libpsm2-11.2.185/opa/opa_debug.c:142: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/libpsm2-11.2.185/opa/opa_debug.c:180: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 buf[150], hname[64], fname[128];
data/libpsm2-11.2.185/opa/opa_debug.c:236: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/libpsm2-11.2.185/opa/opa_debug.c:294: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/libpsm2-11.2.185/opa/opa_debug.c:305: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/libpsm2-11.2.185/opa/opa_debug.c:310: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/libpsm2-11.2.185/opa/opa_debug.c:339: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/libpsm2-11.2.185/opa/opa_dwordcpy-generic.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(vdest, vsrc, nchars);
data/libpsm2-11.2.185/opa/opa_dwordcpy-generic.c:315: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(vdest, vsrc, nchars);
data/libpsm2-11.2.185/opa/opa_dwordcpy-x86_64.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(vdest, vsrc, nchars);
data/libpsm2-11.2.185/opa/opa_dwordcpy-x86_64.c:315: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(vdest, vsrc, nchars);
data/libpsm2-11.2.185/opa/opa_service.c:108: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/libpsm2-11.2.185/opa/opa_sysfs.c:163: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/libpsm2-11.2.185/opa/opa_sysfs.c:168: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(buf, flags);
data/libpsm2-11.2.185/opa/opa_sysfs.c:184: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/libpsm2-11.2.185/opa/opa_sysfs.c:188: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(buf, flags);
data/libpsm2-11.2.185/opa/opa_sysfs.c:204: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/libpsm2-11.2.185/opa/opa_sysfs.c:209: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(buf, flags);
data/libpsm2-11.2.185/opa/opa_sysfs.c:226: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/libpsm2-11.2.185/opa/opa_sysfs.c:231: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(buf, flags);
data/libpsm2-11.2.185/opa/opa_sysfs.c:247: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/libpsm2-11.2.185/opa/opa_sysfs.c:251: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(buf, flags);
data/libpsm2-11.2.185/opa/opa_syslog.c:73: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 logprefix[SYSLOG_MAXLEN];
data/libpsm2-11.2.185/opa/opa_syslog.c:77: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 hostname[80];
data/libpsm2-11.2.185/opa/opa_time.c:239: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/libpsm2-11.2.185/opa/opa_time.c:252:14:  [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/libpsm2-11.2.185/opa/opa_time.c:253:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char input[255];
data/libpsm2-11.2.185/psm.c:567: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 ofed_delta[100] = "";
data/libpsm2-11.2.185/psm.c:568:10:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(strcat(ofed_delta," built for OFED DELTA "),psmi_hfi_IFS_version);
data/libpsm2-11.2.185/psm2.h:1442: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];	/**< String representation of the UUID for this end-point */
data/libpsm2-11.2.185/psm_am.c:341: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(parameters, &psmi_am_parameters, s);
data/libpsm2-11.2.185/psm_context.c:133:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		int r = atoi(env_val);
data/libpsm2-11.2.185/psm_diags.c:227: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/libpsm2-11.2.185/psm_ep.c:489:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(array_of_epinfo[i].uuid,
data/libpsm2-11.2.185/psm_ep.c:678: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], *p, *e;
data/libpsm2-11.2.185/psm_ep.c:900: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(&ep->uuid, (void *)unique_job_key, sizeof(psm2_uuid_t));
data/libpsm2-11.2.185/psm_ep.c:959:56:  [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/libpsm2-11.2.185/psm_ep.c:1034: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 uvalue[6], pvalue[6];
data/libpsm2-11.2.185/psm_ep.c:1529:13:  [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/libpsm2-11.2.185/psm_ep.c:1535: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(b_new, "amsh,");
data/libpsm2-11.2.185/psm_ep.c:1541: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(b_new, "ips,");
data/libpsm2-11.2.185/psm_ep_connect.c:266: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 errbuf[PSM2_ERRSTRING_MAXLEN];
data/libpsm2-11.2.185/psm_ep_connect.c:534: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 errbuf[PSM2_ERRSTRING_MAXLEN];
data/libpsm2-11.2.185/psm_error.c:63: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 err_string[PSM2_ERRSTRING_MAXLEN];
data/libpsm2-11.2.185/psm_error.c:147: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 *c, fullmsg[PSM2_ERRSTRING_MAXLEN];
data/libpsm2-11.2.185/psm_hal_gen1/opa_proto_gen1.c:380:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(uinfo->uuid,uinfo_new.uuid,sizeof(uinfo_new.uuid));
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:130: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 dev_name_ignored[256];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:148: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(dev_name, O_RDWR)) == -1) {
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:320: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 pathname[PATH_MAX];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:583: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 sl2scpath[16];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:605: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 sc2vlpath[16];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:627: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 vl2mtupath[16];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:649: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 index2pkeypath[16];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:685: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(ccabuf, O_RDONLY);
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:707: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[256];
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:714: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(pathname, O_RDONLY);
data/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h:664: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/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h:666: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/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h:668: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/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h:674: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/libpsm2-11.2.185/psm_hal_gen1/opa_user_gen1.h:676: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/libpsm2-11.2.185/psm_hal_gen1/psm_gdrcpy.c:208:11:  [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).
	gdr_fd = open(GDR_DEVICE_PATH, O_RDWR);
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.c:213: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/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.c:219: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 bufctr[128];
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_inline_i.h:549: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 dev_name[PATH_MAX];
data/libpsm2-11.2.185/psm_help.h:175:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char errmsg[64];				\
data/libpsm2-11.2.185/psm_mq.c:1328: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 msg_buffer[MSG_BUFFER_LEN];
data/libpsm2-11.2.185/psm_mq.c:1349: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 perf_file_name[MSG_BUFFER_LEN];
data/libpsm2-11.2.185/psm_mq.c:1350: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 msg_buffer[MSG_BUFFER_LEN];
data/libpsm2-11.2.185/psm_mq.c:1356:24:  [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 *perf_stats_fd = fopen(perf_file_name, "w+");
data/libpsm2-11.2.185/psm_mq.c:1447: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/libpsm2-11.2.185/psm_mq.c:1486: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(stats, &mq->stats, sizeof(psm2_mq_stats_t));
data/libpsm2-11.2.185/psm_mq_utils.c:251: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 *desc[8];
data/libpsm2-11.2.185/psm_perf.c:78:1:  [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 global_rdpmc_slot_name[RDPMC_PERF_MAX_SLOT_NUMBER][RDPMC_PERF_MAX_SLOT_NAME];
data/libpsm2-11.2.185/psm_perf.h:74: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.
extern char global_rdpmc_slot_name[RDPMC_PERF_MAX_SLOT_NUMBER][RDPMC_PERF_MAX_SLOT_NAME];
data/libpsm2-11.2.185/psm_stats.c:167: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/libpsm2-11.2.185/psm_stats.c:291:21:  [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/libpsm2-11.2.185/psm_stats.c:450: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/libpsm2-11.2.185/psm_user.h:536:47:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
#define COMPILE_TIME_ASSERT(NAME,COND) extern char NAME[1/ COND]
data/libpsm2-11.2.185/psm_utils.c:298: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 hostname[80] = { '\0' };
data/libpsm2-11.2.185/psm_utils.c:354: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 hostnamebufs[4][PSMI_EP_HOSTNAME_LEN];
data/libpsm2-11.2.185/psm_utils.c:380: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 hostnamebufs[4][PSMI_EP_HOSTNAME_LEN];
data/libpsm2-11.2.185/psm_utils.c:747:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&addr, he->h_addr, sizeof(uint32_t));
data/libpsm2-11.2.185/psm_utils.c:763: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/libpsm2-11.2.185/psm_utils.c:833: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 spec_name[PSMI_FAULTINJ_SPEC_NAMELEN];
data/libpsm2-11.2.185/psm_utils.c:904:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[192];
data/libpsm2-11.2.185/psm_utils.c:913:8:  [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/libpsm2-11.2.185/psm_utils.c:977: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 fvals_str[128];
data/libpsm2-11.2.185/psm_utils.c:978: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 fname[128];
data/libpsm2-11.2.185/psm_utils.c:979: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 fdesc[300];
data/libpsm2-11.2.185/psm_utils.c:1133: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.
typedef char HD_Hdr_Magic_Type[8];
data/libpsm2-11.2.185/psm_utils.c:1173: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.
typedef char HD_Trlr_Magic_Type[16];
data/libpsm2-11.2.185/psm_utils.c:1322: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(hd_alloc->magic1,HD_HDR_MGC_1,sizeof(HD_HDR_MGC_1));
data/libpsm2-11.2.185/psm_utils.c:1329: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(hd_alloc->magic2,HD_HDR_MGC_2,sizeof(HD_HDR_MGC_2));
data/libpsm2-11.2.185/psm_utils.c:1330: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(HD_GET_HD_TRLR(hd_alloc),HD_TRLR_MGC,sizeof(HD_TRLR_MGC));
data/libpsm2-11.2.185/psm_utils.c:1499: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(newPtr,ptr,existingSize);
data/libpsm2-11.2.185/psm_utils.c:1582: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(newa, string, len);	/* copy with \0 */
data/libpsm2-11.2.185/psm_utils.c:1998:27:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pfnc->firstLineNumber = atoi(s);
data/libpsm2-11.2.185/psm_utils.c:2004:28:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			pfnc->firstLineNumber = atoi(s);
data/libpsm2-11.2.185/psm_utils.c:2006:76:  [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).
			insertNodeInTree(pfnc->root,pfnc->currentFuncName,pfnc->firstLineNumber,atoi(s));
data/libpsm2-11.2.185/psm_utils.c:2240: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 logFileName[256];
data/libpsm2-11.2.185/psm_utils.c:2245: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).
				fout = fopen(logFileName,"w");
data/libpsm2-11.2.185/psm_utils.c:2464: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 logFileName[256];
data/libpsm2-11.2.185/psm_utils.c:2530:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fout = fopen(logFileName,"a");
data/libpsm2-11.2.185/psm_utils.c:2564: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(voidarray,newframes,sizeof(newframes));
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:201:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		static char shm_errmsg[256];
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:253: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 shmbuf[256];
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:379: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(new, ptl->am_ep,
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:421: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 shmbuf[256];
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:1137: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/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:1294:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		if (p && *p && atoi(p) != 0) {
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:75: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 eplid[128];
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:237: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 eplid[128];
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:523: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 hfiName[32];
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:276: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 eplid[128];
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:391: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 eplid[128];
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:679: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/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:714:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&proto->ccti_ctrlmap, p, 4);
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:716:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&proto->ccti_portctrl, p, 2);
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:723: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(&proto->cace[i].ccti_timer_cycles, p, 2);
data/libpsm2-11.2.185/ptl_ips/ips_proto.c:607: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 ipbuf[INET_ADDRSTRLEN], *p;
data/libpsm2-11.2.185/ptl_ips/ips_proto_am.c:448: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(&args[2], payload, payload_args_len);
data/libpsm2-11.2.185/ptl_ips/ips_proto_am.c:582:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&msg->p_hdr, p_hdr, sizeof(struct ips_message_header));
data/libpsm2-11.2.185/ptl_ips/ips_proto_am.c:583:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(msg_payload, payload, paylen);
data/libpsm2-11.2.185/ptl_ips/ips_proto_connect.c:90: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[128];	/* sender's hostname string */
data/libpsm2-11.2.185/ptl_ips/ips_proto_connect.c:390: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 payload[sizeof(struct ips_connect_reqrep) +
data/libpsm2-11.2.185/ptl_ips/ips_proto_connect.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 payload[sizeof(struct ips_connect_reqrep) +
data/libpsm2-11.2.185/ptl_ips/ips_proto_dump.c:161: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(d + dlen, s, slen);
data/libpsm2-11.2.185/ptl_ips/ips_proto_dump.c:189: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 err_stat_msg[2048];
data/libpsm2-11.2.185/ptl_ips/ips_proto_dump.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 tmp_buf[128];
data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:986: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/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:1008: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/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:1746:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(tidsendc->buffer, chb->host_buf +
data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:1748:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(tidsendc->buffer+ chb->size -
data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:2583:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[128];
data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:2618: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 pktmsg[128];
data/libpsm2-11.2.185/ptl_ips/ips_proto_expected.c:2619: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 errmsg[256];
data/libpsm2-11.2.185/ptl_ips/ips_proto_recv.c:148: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 ipbuf[INET_ADDRSTRLEN], *ip = NULL;
data/libpsm2-11.2.185/ptl_ips/ips_proto_recv.c:149: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 bufpid[32];
data/libpsm2-11.2.185/ptl_ips/ips_proto_recv.c:1266: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 pktmsg[128];
data/libpsm2-11.2.185/ptl_ips/ptl_rcvthread.c:235: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/libpsm2-11.2.185/ptl_ips/ptl_rcvthread.c:468: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(&ratio_u, &ratio, sizeof(uint64_t));
data/libpsm2-11.2.185/libuuid/parse.c:48: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/libpsm2-11.2.185/libuuid/psm_uuid.c:92:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		nbytes = read(fd, (char *) uuid_out, 16);
data/libpsm2-11.2.185/opa/opa_sysfs.c:93: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).
		unsigned len = strlen(dflt_hfi_class_path) + 4;
data/libpsm2-11.2.185/opa/opa_sysfs.c:128:20:  [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/libpsm2-11.2.185/opa/opa_sysfs.c:278:8:  [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/libpsm2-11.2.185/opa/opa_sysfs.c:343:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	rv = read(fd, buff, size);
data/libpsm2-11.2.185/opa/opa_sysfs.c:458:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, buf, n);
data/libpsm2-11.2.185/opa/opa_sysfs.c:481:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ret = read(fd, buf, n);
data/libpsm2-11.2.185/opa/opa_syslog.c:80:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(format);
data/libpsm2-11.2.185/opa/opa_time.c:178:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(125);
data/libpsm2-11.2.185/psm.c:786:29:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (networkTypeLength >= strlen(intelopa)+1)
data/libpsm2-11.2.185/psm_ep.c:951:2:  [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/libpsm2-11.2.185/psm_ep.c:954: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).
	p = buf + strlen(buf);
data/libpsm2-11.2.185/psm_ep.c:959: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).
		len = snprintf(p, sizeof(buf) - strlen(buf), ":%d.", atoi(e));
data/libpsm2-11.2.185/psm_ep.c:961: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).
		len = snprintf(p, sizeof(buf) - strlen(buf), ":%d.%d.",
data/libpsm2-11.2.185/psm_ep.c:1505: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).
	len = strlen(devstring) + 1;
data/libpsm2-11.2.185/psm_ep.c:1516:2:  [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/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:690:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, ccabuf, count) != count) {
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:719:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(fd, &ccti_limit, sizeof(ccti_limit)) != sizeof(ccti_limit)) {
data/libpsm2-11.2.185/psm_hal_gen1/opa_service_gen1.c:740:6:  [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/libpsm2-11.2.185/psm_hal_gen1/opa_utils_gen1.c:236: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/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.c:434:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(1000);
data/libpsm2-11.2.185/psm_hal_gen1/psm_hal_gen1_spio.c:530:4:  [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(1000);
data/libpsm2-11.2.185/psm_mq.c:1334: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).
	fwrite(msg_buffer, sizeof(char), strlen(msg_buffer), perf_stats_fd);
data/libpsm2-11.2.185/psm_mq.c:1366: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).
	fwrite(msg_buffer, sizeof(char), strlen(msg_buffer), perf_stats_fd);
data/libpsm2-11.2.185/psm_mq.c:1378:36:  [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).
		fwrite(msg_buffer, sizeof(char), strlen(msg_buffer), perf_stats_fd);
data/libpsm2-11.2.185/psm_mq.c:1381:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(MICRO_SEC * mq->print_stats);
data/libpsm2-11.2.185/psm_perf.h:97:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(global_rdpmc_slot_name[(slot_number)], (name), RDPMC_PERF_MAX_SLOT_NAME - 1); \
data/libpsm2-11.2.185/psm_stats.c:179:4:  [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/libpsm2-11.2.185/psm_utils.c:340: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).
	hlen = min(PSMI_EP_HOSTNAME_LEN, strlen(hostname) + 1);
data/libpsm2-11.2.185/psm_utils.c:622:4:  [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/libpsm2-11.2.185/psm_utils.c:954:2:  [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/libpsm2-11.2.185/psm_utils.c:1512:8:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
#ifdef memalign
data/libpsm2-11.2.185/psm_utils.c:1513:8:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
#undef memalign
data/libpsm2-11.2.185/psm_utils.c:1578: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(string) + 1;
data/libpsm2-11.2.185/psm_utils.c:2062:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	char *p = alloca(strlen(buf)+1);
data/libpsm2-11.2.185/psm_utils.h:212:9:  [1] (free) memalign:
  On some systems (though not Linux-based systems) an attempt to free()
  results from memalign() may fail. This may, on a few systems, be
  exploitable. Also note that memalign() may not check that the boundary
  parameter is correct (CWE-676). Use posix_memalign instead (defined in
  POSIX's 1003.1d). Don't switch to valloc(); it is marked as obsolete in BSD
  4.3, as legacy in SUSv2, and is no longer defined in SUSv3. In some cases,
  malloc()'s alignment may be sufficient.
#define memalign(algn,sz) _use_psmi_memalign_instead_of_plain_memalign
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:208: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).
		if (psmi_write(2, shm_errmsg, strlen(shm_errmsg) + 1) == -1)
data/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:521:4:  [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/libpsm2-11.2.185/ptl_am/am_reqrep_shmem.c:847:4:  [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/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:105:44:  [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).
		    psmi_calloc(proto->ep, UNDEFINED, 1, strlen(eplid) + 1);
data/libpsm2-11.2.185/ptl_ips/ips_opp_path_rec.c:319:50:  [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/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:285:44:  [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).
		    psmi_calloc(proto->ep, UNDEFINED, 1, strlen(eplid) + 1);
data/libpsm2-11.2.185/ptl_ips/ips_path_rec.c:416:50:  [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/libpsm2-11.2.185/ptl_ips/ips_proto_connect.c:479:3:  [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/libpsm2-11.2.185/ptl_ips/ips_proto_dump.c:154: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).
	int dlen = strlen(d), slen, max;
data/libpsm2-11.2.185/ptl_ips/ips_proto_dump.c:157:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	slen = strlen(s);

ANALYSIS SUMMARY:

Hits = 276
Lines analyzed = 61586 in approximately 1.82 seconds (33875 lines/second)
Physical Source Lines of Code (SLOC) = 36881
Hits@level = [0] 158 [1]  47 [2] 149 [3]  51 [4]  29 [5]   0
Hits@level+ = [0+] 434 [1+] 276 [2+] 229 [3+]  80 [4+]  29 [5+]   0
Hits/KSLOC@level+ = [0+] 11.7676 [1+] 7.48353 [2+] 6.20916 [3+] 2.16914 [4+] 0.786313 [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.