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/x11-session-utils-7.7+4/rstart/auth.c
Examining data/x11-session-utils-7.7+4/rstart/server.c
Examining data/x11-session-utils-7.7+4/rstart/server.h
Examining data/x11-session-utils-7.7+4/smproxy/save.c
Examining data/x11-session-utils-7.7+4/smproxy/smproxy.c
Examining data/x11-session-utils-7.7+4/smproxy/smproxy.h
Examining data/x11-session-utils-7.7+4/xsm/auth.c
Examining data/x11-session-utils-7.7+4/xsm/auth.h
Examining data/x11-session-utils-7.7+4/xsm/choose.c
Examining data/x11-session-utils-7.7+4/xsm/choose.h
Examining data/x11-session-utils-7.7+4/xsm/info.c
Examining data/x11-session-utils-7.7+4/xsm/info.h
Examining data/x11-session-utils-7.7+4/xsm/list.c
Examining data/x11-session-utils-7.7+4/xsm/list.h
Examining data/x11-session-utils-7.7+4/xsm/lock.c
Examining data/x11-session-utils-7.7+4/xsm/lock.h
Examining data/x11-session-utils-7.7+4/xsm/log.c
Examining data/x11-session-utils-7.7+4/xsm/log.h
Examining data/x11-session-utils-7.7+4/xsm/mainwin.c
Examining data/x11-session-utils-7.7+4/xsm/mainwin.h
Examining data/x11-session-utils-7.7+4/xsm/misc.c
Examining data/x11-session-utils-7.7+4/xsm/popup.c
Examining data/x11-session-utils-7.7+4/xsm/popup.h
Examining data/x11-session-utils-7.7+4/xsm/printhex.c
Examining data/x11-session-utils-7.7+4/xsm/prop.c
Examining data/x11-session-utils-7.7+4/xsm/prop.h
Examining data/x11-session-utils-7.7+4/xsm/remote.c
Examining data/x11-session-utils-7.7+4/xsm/restart.c
Examining data/x11-session-utils-7.7+4/xsm/restart.h
Examining data/x11-session-utils-7.7+4/xsm/save.c
Examining data/x11-session-utils-7.7+4/xsm/save.h
Examining data/x11-session-utils-7.7+4/xsm/saveutil.c
Examining data/x11-session-utils-7.7+4/xsm/saveutil.h
Examining data/x11-session-utils-7.7+4/xsm/signals.c
Examining data/x11-session-utils-7.7+4/xsm/xsm.c
Examining data/x11-session-utils-7.7+4/xsm/xsm.h
Examining data/x11-session-utils-7.7+4/xsm/xtwatch.c
Examining data/x11-session-utils-7.7+4/xsm/xtwatch.h

FINAL RESULTS:

data/x11-session-utils-7.7+4/rstart/auth.c:184:4:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			execvp(auth->program[0], auth->program+1);
data/x11-session-utils-7.7+4/rstart/auth.c:235:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(p, av[i-1]);
data/x11-session-utils-7.7+4/rstart/server.c:183: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(cs, s);
data/x11-session-utils-7.7+4/rstart/server.c:378: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(buf, parm_internal_global_contexts);
data/x11-session-utils-7.7+4/rstart/server.c:380: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(buf, parm_context);
data/x11-session-utils-7.7+4/rstart/server.c:388: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(buf, parm_internal_local_contexts);
data/x11-session-utils-7.7+4/rstart/server.c:390: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(buf, parm_context);
data/x11-session-utils-7.7+4/rstart/server.c:463:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "DISPLAY=%u.%u.%u.%u%s",
data/x11-session-utils-7.7+4/rstart/server.c:536:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buf, *pa);
data/x11-session-utils-7.7+4/rstart/server.c:545:3:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execl(shell, shell, "-c", buf+1, (char *)NULL);
data/x11-session-utils-7.7+4/rstart/server.c:558:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(parm_exec[1], parm_exec+2);
data/x11-session-utils-7.7+4/rstart/server.c:582: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(buf, parm_internal_local_commands);
data/x11-session-utils-7.7+4/rstart/server.c:584:5:  [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(buf, parm_context);
data/x11-session-utils-7.7+4/rstart/server.c:586:5:  [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(buf, parm_generic_cmd[1]);
data/x11-session-utils-7.7+4/rstart/server.c:587:5:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
				execv(buf, parm_generic_cmd+1);
data/x11-session-utils-7.7+4/rstart/server.c:591: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(buf, parm_internal_global_commands);
data/x11-session-utils-7.7+4/rstart/server.c:593:5:  [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(buf, parm_context);
data/x11-session-utils-7.7+4/rstart/server.c:595:5:  [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(buf, parm_generic_cmd[1]);
data/x11-session-utils-7.7+4/rstart/server.c:596:5:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
				execv(buf, parm_generic_cmd+1);
data/x11-session-utils-7.7+4/rstart/server.c:602:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(buf, parm_internal_local_commands);
data/x11-session-utils-7.7+4/rstart/server.c:604:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buf, parm_generic_cmd[1]);
data/x11-session-utils-7.7+4/rstart/server.c:605:4:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			execv(buf, parm_generic_cmd+1);
data/x11-session-utils-7.7+4/rstart/server.c:609:4:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
			strcpy(buf, parm_internal_global_commands);
data/x11-session-utils-7.7+4/rstart/server.c:611:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(buf, parm_generic_cmd[1]);
data/x11-session-utils-7.7+4/rstart/server.c:612:4:  [4] (shell) execv:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
			execv(buf, parm_generic_cmd+1);
data/x11-session-utils-7.7+4/rstart/server.c:712:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(s, "%s_%s=%s", prefix, name, value);
data/x11-session-utils-7.7+4/smproxy/save.c:55:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
    len = vsnprintf(buf, sizeof(buf), format, ap);
data/x11-session-utils-7.7+4/smproxy/save.c:71: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.
	    len = vsnprintf(*ret, len + 1, format, ap);
data/x11-session-utils-7.7+4/smproxy/save.c:360:9:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    if (mktemp(tempFile) == NULL)
data/x11-session-utils-7.7+4/xsm/auth.c:99:20:  [4] (tmpfile) mktemp:
  Temporary file race condition (CWE-377).
    tmp = (char *) mktemp (tempFile);
data/x11-session-utils-7.7+4/xsm/info.c:125:5:  [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 (buffer->bufPtr, str);
data/x11-session-utils-7.7+4/xsm/misc.c:114:2:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execl ("/bin/sh", "sh", "-c", s, NULL);
data/x11-session-utils-7.7+4/xsm/remote.c:95:6:  [4] (shell) execlp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	    execlp (RSHCMD, restart_machine, "rstartd", (char *) 0);
data/x11-session-utils-7.7+4/xsm/remote.c:235: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 (ptr, octal);
data/x11-session-utils-7.7+4/xsm/restart.c:251:7:  [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 (logtext, *pp);
data/x11-session-utils-7.7+4/xsm/restart.c:268:7:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		    execvp(program, args);
data/x11-session-utils-7.7+4/xsm/restart.c:301:7:  [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 (logtext, *pp);
data/x11-session-utils-7.7+4/xsm/restart.c:456:3:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
		execvp(program, args);
data/x11-session-utils-7.7+4/xsm/saveutil.c:225: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 (non_session_aware_clients[i], buf);
data/x11-session-utils-7.7+4/xsm/saveutil.c:234: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 (strbuf, non_session_aware_clients[i]);
data/x11-session-utils-7.7+4/xsm/signals.c:240:12:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    stat = system (s);
data/x11-session-utils-7.7+4/xsm/xsm.c:458:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy (non_local_display_env, display_env);
data/x11-session-utils-7.7+4/xsm/xsm.c:481: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 (non_local_session_env, session_env);
data/x11-session-utils-7.7+4/xsm/xsm.c:1206:6:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
	    strcpy (*failureReasonRet, str);
data/x11-session-utils-7.7+4/xsm/xsm.h:213:9:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
#define system(s) System(s)
data/x11-session-utils-7.7+4/rstart/server.c:523:16:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		if(!(shell = getenv("SHELL"))) shell = "/bin/sh";
data/x11-session-utils-7.7+4/smproxy/save.c:363:16:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
    tempFile = tempnam (path, prefix);
data/x11-session-utils-7.7+4/smproxy/save.c:392: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.
    path = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/smproxy/save.c:395:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/auth.c:93:22:  [3] (tmpfile) tempnam:
  Temporary file race condition (CWE-377).
    return ((char *) tempnam (path, prefix));
data/x11-session-utils-7.7+4/xsm/auth.c:146: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.
    path = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/xsm/auth.c:149:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/choose.c:84: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.
    path = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/xsm/choose.c:87:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/lock.c:37: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 *path = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/xsm/lock.c:41:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	path = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/remote.c:151:25:  [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 *path = (char *) getenv ("PATH");
data/x11-session-utils-7.7+4/xsm/restart.c:529: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.
    home = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/saveutil.c:41:9:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    p = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/xsm/saveutil.c:44: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.
	p = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/saveutil.c:422: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.
    dir = getenv ("SM_SAVE_DIR");
data/x11-session-utils-7.7+4/xsm/saveutil.c:425:8:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	dir = getenv ("HOME");
data/x11-session-utils-7.7+4/xsm/xsm.c:437:48:  [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((p = cmd_line_display) || (p = (char *) getenv(envDISPLAY))) {
data/x11-session-utils-7.7+4/xsm/xsm.c:471: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.
    if((p = (char *) getenv(envSESSION_MANAGER))) {
data/x11-session-utils-7.7+4/xsm/xsm.c:507: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.
    if((p = (char *) getenv(envAUDIOSERVER))) {
data/x11-session-utils-7.7+4/rstart/auth.c:212: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[BUFSIZ];
data/x11-session-utils-7.7+4/rstart/server.c:134:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen(parm_global_default, "r");
data/x11-session-utils-7.7+4/rstart/server.c:139:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		f = fopen(parm_internal_local_default, "r");
data/x11-session-utils-7.7+4/rstart/server.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 buf[2048];
data/x11-session-utils-7.7+4/rstart/server.c:364: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/x11-session-utils-7.7+4/rstart/server.c:381:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if((f = fopen(buf, "r"))) {
data/x11-session-utils-7.7+4/rstart/server.c:391:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		if((f = fopen(buf, "r"))) {
data/x11-session-utils-7.7+4/rstart/server.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[80];
data/x11-session-utils-7.7+4/rstart/server.c:565: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[1024];
data/x11-session-utils-7.7+4/rstart/server.c:693: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).
		dup(dup(open("/dev/null", O_RDWR)));
data/x11-session-utils-7.7+4/smproxy/save.c:50:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/x11-session-utils-7.7+4/smproxy/save.c:101:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char   file_short[2];
data/x11-session-utils-7.7+4/smproxy/save.c:146:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    unsigned char   file_short[2];
data/x11-session-utils-7.7+4/smproxy/save.c:318:17:  [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).
    proxyFile = fopen (filename, "rb");
data/x11-session-utils-7.7+4/smproxy/save.c:356:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    tempFd = mkstemp(tempFile);
data/x11-session-utils-7.7+4/smproxy/save.c:367: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).
	tempFd = open(tempFile, O_RDWR | O_CREAT | O_EXCL, 0600);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:211: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 hostnamebuf[80];
data/x11-session-utils-7.7+4/smproxy/smproxy.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 userId[20], restartService[80];
data/x11-session-utils-7.7+4/smproxy/smproxy.c:459: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 errorMsg[256];
data/x11-session-utils-7.7+4/smproxy/smproxy.c:892: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 userId[20];
data/x11-session-utils-7.7+4/smproxy/smproxy.c:1063: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 errorMsg[256];
data/x11-session-utils-7.7+4/xsm/auth.c:95: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 tempFile[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/auth.c:108: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 tempFile[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/auth.c:115:10:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	*pFd =  mkstemp(ptr);
data/x11-session-utils-7.7+4/xsm/auth.c:138: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	command[256];
data/x11-session-utils-7.7+4/xsm/auth.c:157:19:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(addfp = fopen (addAuthFile, "w")))
data/x11-session-utils-7.7+4/xsm/auth.c:164:22:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if (!(removefp = fopen (remAuthFile, "w")))
data/x11-session-utils-7.7+4/xsm/auth.c:260: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 command[256];
data/x11-session-utils-7.7+4/xsm/choose.c:185:11:  [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.
	XtFree ((char *) namesShort[i]);
data/x11-session-utils-7.7+4/xsm/choose.c:192:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		XtFree ((char *) namesLong[i]);
data/x11-session-utils-7.7+4/xsm/choose.c:510:16:  [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.
		    XtFree ((char *) sessionNamesShort[i]);
data/x11-session-utils-7.7+4/xsm/choose.c:513:13:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			XtFree ((char *) sessionNamesLong[i]);
data/x11-session-utils-7.7+4/xsm/choose.c:605:11:  [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.
	XtFree ((char *) sessionNamesLong[current->list_index]);
data/x11-session-utils-7.7+4/xsm/info.c:153: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 number[10];
data/x11-session-utils-7.7+4/xsm/info.c:387: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 extraBuf1[80], extraBuf2[80];
data/x11-session-utils-7.7+4/xsm/lock.c:54: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 lock_file[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/lock.c:55: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 temp_lock_file[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/lock.c:95: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 lock_file[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/lock.c:111: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 lock_file[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/lock.c:112:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[256];
data/x11-session-utils-7.7+4/xsm/lock.c:120:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((fp = fopen (lock_file, "r")) == NULL)
data/x11-session-utils-7.7+4/xsm/popup.c:58: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 geom[16];
data/x11-session-utils-7.7+4/xsm/prop.c:168: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 (pval->value, theProp->vals[i].value, theProp->vals[i].length);
data/x11-session-utils-7.7+4/xsm/prop.c:371:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    memcpy (propValRet->value, pval->value, pval->length);
data/x11-session-utils-7.7+4/xsm/remote.c:46: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 msg[256];
data/x11-session-utils-7.7+4/xsm/remote.c:230: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 octal[4];
data/x11-session-utils-7.7+4/xsm/restart.c:81: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 hostnamebuf[80];
data/x11-session-utils-7.7+4/xsm/restart.c:219: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 logtext[256];
data/x11-session-utils-7.7+4/xsm/restart.c:444: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 msg[256];
data/x11-session-utils-7.7+4/xsm/restart.c:521:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char *buf, *p, filename[128];
data/x11-session-utils-7.7+4/xsm/restart.c:534:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen (filename, "r");
data/x11-session-utils-7.7+4/xsm/restart.c:538:6:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	f = fopen (SYSTEM_INIT_FILE, "r");
data/x11-session-utils-7.7+4/xsm/restart.c:553: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 logtext[256];
data/x11-session-utils-7.7+4/xsm/restart.c:583: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 logtext[256];
data/x11-session-utils-7.7+4/xsm/restart.c:600: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.
	free ((char *) non_session_aware_clients[i]);
data/x11-session-utils-7.7+4/xsm/save.c:100:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char title[256];
data/x11-session-utils-7.7+4/xsm/save.c:387: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 label[256];
data/x11-session-utils-7.7+4/xsm/save.c:1200: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 extraBuf1[80], extraBuf2[80];
data/x11-session-utils-7.7+4/xsm/saveutil.c:33:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static char 		 session_save_file[PATH_MAX];
data/x11-session-utils-7.7+4/xsm/saveutil.c:68:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(session_save_file, "r");
data/x11-session-utils-7.7+4/xsm/saveutil.c:85:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    version_number = atoi (buf);
data/x11-session-utils-7.7+4/xsm/saveutil.c:106:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	num_clients_in_last_session = atoi (buf);
data/x11-session-utils-7.7+4/xsm/saveutil.c:191:29:  [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).
		*((char *)(val->value)) = atoi (p);
data/x11-session-utils-7.7+4/xsm/saveutil.c:212: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).
	non_session_aware_count = atoi (buf);
data/x11-session-utils-7.7+4/xsm/saveutil.c:310:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen (session_save_file, "w");
data/x11-session-utils-7.7+4/xsm/saveutil.c:314: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[256];
data/x11-session-utils-7.7+4/xsm/saveutil.c:419: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	filename[256];
data/x11-session-utils-7.7+4/xsm/saveutil.c:432:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    f = fopen(filename, "r");
data/x11-session-utils-7.7+4/xsm/saveutil.c:444:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    version_number = atoi (buf);
data/x11-session-utils-7.7+4/xsm/xsm.c:164: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 	errormsg[256];
data/x11-session-utils-7.7+4/xsm/xsm.c:183:23:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		cmd_line_display = (char *) XtNewString (argv[i]);
data/x11-session-utils-7.7+4/xsm/xsm.c:414: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 translation[64];
data/x11-session-utils-7.7+4/xsm/xsm.c:462: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 hostnamebuf[256];
data/x11-session-utils-7.7+4/xsm/xsm.c:519: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 title[256];
data/x11-session-utils-7.7+4/rstart/auth.c:194:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					write(p[1], s, strlen(s));
data/x11-session-utils-7.7+4/rstart/auth.c:236: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).
			p += strlen(p);
data/x11-session-utils-7.7+4/rstart/server.c:182:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    cs = malloc(strlen(s)+1);
data/x11-session-utils-7.7+4/rstart/server.c:199:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		while((c = getc(f)) != '\n') {
data/x11-session-utils-7.7+4/rstart/server.c:379:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:389:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:527:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len += strlen(*pa) + 1;
data/x11-session-utils-7.7+4/rstart/server.c:535:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat(buf, " ");
data/x11-session-utils-7.7+4/rstart/server.c:583:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:585:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:592:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:594:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:603:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:610:4:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
			strcat(buf, "/");
data/x11-session-utils-7.7+4/rstart/server.c:708: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).
	s = malloc(strlen(prefix) + strlen(name) + strlen(value) + 3);
data/x11-session-utils-7.7+4/rstart/server.c:708:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	s = malloc(strlen(prefix) + strlen(name) + strlen(value) + 3);
data/x11-session-utils-7.7+4/rstart/server.c:708:45:  [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).
	s = malloc(strlen(prefix) + strlen(name) + strlen(value) + 3);
data/x11-session-utils-7.7+4/rstart/server.c:737:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(i);
data/x11-session-utils-7.7+4/smproxy/save.c:116:24:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	unsigned char count = strlen (string);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:256: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).
	prop1val.length = strlen (winInfo->wm_command[0]);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:264: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).
	prop2val.length = strlen (userId);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:278: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).
	prop3val.length = strlen (restartService);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:305: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).
	prop1.vals[i].length = strlen (winInfo->wm_command[i]);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:900: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).
	prop1val.length = strlen (Argv[0]);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:908: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).
	prop2val.length = strlen (userId);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:956:37:  [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).
	    prop1.vals[numVals++].length = strlen (Argv[i]);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:964: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).
    prop1.vals[numVals++].length = strlen (proxy_clientId);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:970: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).
    prop1.vals[numVals++].length = strlen (filename);
data/x11-session-utils-7.7+4/smproxy/smproxy.c:984:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    prop2val.length = strlen (discardCommand);
data/x11-session-utils-7.7+4/xsm/auth.c:144:22:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    original_umask = umask (0077);	/* disallow non-owner access */
data/x11-session-utils-7.7+4/xsm/auth.c:218:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask (original_umask);
data/x11-session-utils-7.7+4/xsm/info.c:106: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).
    int len = strlen (str);
data/x11-session-utils-7.7+4/xsm/info.c:368:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    for (i = 0; i < (int) strlen (fullname); i++)
data/x11-session-utils-7.7+4/xsm/info.c:440:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if ((int) strlen (progName) > maxlen1)
data/x11-session-utils-7.7+4/xsm/info.c:441: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).
			    maxlen1 = strlen (progName);
data/x11-session-utils-7.7+4/xsm/info.c:465: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).
	if ((int) strlen (hostname) > maxlen2)
data/x11-session-utils-7.7+4/xsm/info.c:466:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    maxlen2 = strlen (hostname);
data/x11-session-utils-7.7+4/xsm/info.c:548:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	extra1 = maxlen1 - strlen (progName) + 5;
data/x11-session-utils-7.7+4/xsm/info.c:549:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	extra2 = maxlen2 - strlen (hostname);
data/x11-session-utils-7.7+4/xsm/lock.c:70: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).
        (write (fd, networkIds, strlen (networkIds)) != strlen (networkIds))) ||
data/x11-session-utils-7.7+4/xsm/lock.c:70:57:  [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).
        (write (fd, networkIds, strlen (networkIds)) != strlen (networkIds))) ||
data/x11-session-utils-7.7+4/xsm/lock.c:127:5:  [1] (buffer) fscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
    fscanf (fp, "%255s\n", buf);
data/x11-session-utils-7.7+4/xsm/log.c:86: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).
    text.length = strlen (str);
data/x11-session-utils-7.7+4/xsm/misc.c:100:28:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    return !strncmp (a, b, strlen (b));
data/x11-session-utils-7.7+4/xsm/remote.c:221: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).
	int len = strlen (str) + 1 + (escape_count * 3);
data/x11-session-utils-7.7+4/xsm/remote.c:233:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (i = 0; i < (3 - (int) strlen (octal)); i++)
data/x11-session-utils-7.7+4/xsm/remote.c:236:10:  [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).
		ptr += strlen (octal);
data/x11-session-utils-7.7+4/xsm/restart.c:252:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		    strcat (logtext, " ");
data/x11-session-utils-7.7+4/xsm/restart.c:255:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat (logtext, "\n");
data/x11-session-utils-7.7+4/xsm/restart.c:302:7:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		    strcat (logtext, " ");
data/x11-session-utils-7.7+4/xsm/restart.c:304:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat (logtext, "\n");
data/x11-session-utils-7.7+4/xsm/restart.c:564: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 (buf);
data/x11-session-utils-7.7+4/xsm/restart.c:598:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat (non_session_aware_clients[i], "&");
data/x11-session-utils-7.7+4/xsm/save.c:1241: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).
		if ((int) strlen (progName) > maxlen1)
data/x11-session-utils-7.7+4/xsm/save.c:1242:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    maxlen1 = strlen (progName);
data/x11-session-utils-7.7+4/xsm/save.c:1265: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).
	if ((int) strlen (hostname) > maxlen2)
data/x11-session-utils-7.7+4/xsm/save.c:1266:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	    maxlen2 = strlen (hostname);
data/x11-session-utils-7.7+4/xsm/save.c:1314:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	extra1 = maxlen1 - strlen (progName) + 5;
data/x11-session-utils-7.7+4/xsm/save.c:1315:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	extra2 = maxlen2 - strlen (hostname);
data/x11-session-utils-7.7+4/xsm/saveutil.c:195:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		val->length = strlen(p);
data/x11-session-utils-7.7+4/xsm/saveutil.c:224:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    strlen (buf) + 2);
data/x11-session-utils-7.7+4/xsm/saveutil.c:226: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).
		bufsize += (strlen (buf) + 1);
data/x11-session-utils-7.7+4/xsm/saveutil.c:235:3:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
		strcat (strbuf, "\n");
data/x11-session-utils-7.7+4/xsm/saveutil.c:534:10:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    c = getc(f);
data/x11-session-utils-7.7+4/xsm/xsm.c:455:3:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		strlen (display_env) + 1);
data/x11-session-utils-7.7+4/xsm/xsm.c:479:45:  [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).
	non_local_session_env = (char *) XtMalloc (strlen (session_env) + 1);
data/x11-session-utils-7.7+4/xsm/xsm.c:489:7:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		    strlen (envSESSION_MANAGER) + 1)
data/x11-session-utils-7.7+4/xsm/xsm.c:499: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).
		int bytes = strlen (delim + 1);
data/x11-session-utils-7.7+4/xsm/xsm.c:584:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	(unsigned char *) sm_id, strlen (sm_id));
data/x11-session-utils-7.7+4/xsm/xsm.c:1205:46:  [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 ((*failureReasonRet = (char *) XtMalloc (strlen (str) + 1)) != NULL)

ANALYSIS SUMMARY:

Hits = 209
Lines analyzed = 11688 in approximately 0.30 seconds (38525 lines/second)
Physical Source Lines of Code (SLOC) = 7777
Hits@level = [0] 227 [1]  70 [2]  74 [3]  20 [4]  45 [5]   0
Hits@level+ = [0+] 436 [1+] 209 [2+] 139 [3+]  65 [4+]  45 [5+]   0
Hits/KSLOC@level+ = [0+] 56.0627 [1+] 26.8741 [2+] 17.8732 [3+] 8.35798 [4+] 5.78629 [5+]   0
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.