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/clex-4.6.patch8/src/bookmarks.c
Examining data/clex-4.6.patch8/src/bookmarks.h
Examining data/clex-4.6.patch8/src/cfg.c
Examining data/clex-4.6.patch8/src/cfg.h
Examining data/clex-4.6.patch8/src/clex.h
Examining data/clex-4.6.patch8/src/clexheaders.h
Examining data/clex-4.6.patch8/src/cmp.c
Examining data/clex-4.6.patch8/src/cmp.h
Examining data/clex-4.6.patch8/src/completion.c
Examining data/clex-4.6.patch8/src/completion.h
Examining data/clex-4.6.patch8/src/control.c
Examining data/clex-4.6.patch8/src/control.h
Examining data/clex-4.6.patch8/src/directory.c
Examining data/clex-4.6.patch8/src/directory.h
Examining data/clex-4.6.patch8/src/edit.c
Examining data/clex-4.6.patch8/src/edit.h
Examining data/clex-4.6.patch8/src/exec.c
Examining data/clex-4.6.patch8/src/exec.h
Examining data/clex-4.6.patch8/src/filepanel.c
Examining data/clex-4.6.patch8/src/filepanel.h
Examining data/clex-4.6.patch8/src/filerw.c
Examining data/clex-4.6.patch8/src/filerw.h
Examining data/clex-4.6.patch8/src/filter.c
Examining data/clex-4.6.patch8/src/filter.h
Examining data/clex-4.6.patch8/src/help.c
Examining data/clex-4.6.patch8/src/help.h
Examining data/clex-4.6.patch8/src/history.c
Examining data/clex-4.6.patch8/src/history.h
Examining data/clex-4.6.patch8/src/inout.c
Examining data/clex-4.6.patch8/src/inout.h
Examining data/clex-4.6.patch8/src/inschar.c
Examining data/clex-4.6.patch8/src/inschar.h
Examining data/clex-4.6.patch8/src/kbd-test.c
Examining data/clex-4.6.patch8/src/lang.c
Examining data/clex-4.6.patch8/src/lang.h
Examining data/clex-4.6.patch8/src/lex.c
Examining data/clex-4.6.patch8/src/lex.h
Examining data/clex-4.6.patch8/src/list.c
Examining data/clex-4.6.patch8/src/list.h
Examining data/clex-4.6.patch8/src/log.c
Examining data/clex-4.6.patch8/src/log.h
Examining data/clex-4.6.patch8/src/match.c
Examining data/clex-4.6.patch8/src/match.h
Examining data/clex-4.6.patch8/src/mbwstring.c
Examining data/clex-4.6.patch8/src/mbwstring.h
Examining data/clex-4.6.patch8/src/mouse.c
Examining data/clex-4.6.patch8/src/mouse.h
Examining data/clex-4.6.patch8/src/notify.c
Examining data/clex-4.6.patch8/src/notify.h
Examining data/clex-4.6.patch8/src/opt.c
Examining data/clex-4.6.patch8/src/opt.h
Examining data/clex-4.6.patch8/src/panel.c
Examining data/clex-4.6.patch8/src/panel.h
Examining data/clex-4.6.patch8/src/preview.c
Examining data/clex-4.6.patch8/src/preview.h
Examining data/clex-4.6.patch8/src/rename.c
Examining data/clex-4.6.patch8/src/rename.h
Examining data/clex-4.6.patch8/src/sdstring.c
Examining data/clex-4.6.patch8/src/sdstring.h
Examining data/clex-4.6.patch8/src/select.c
Examining data/clex-4.6.patch8/src/select.h
Examining data/clex-4.6.patch8/src/signals.c
Examining data/clex-4.6.patch8/src/signals.h
Examining data/clex-4.6.patch8/src/sort.c
Examining data/clex-4.6.patch8/src/sort.h
Examining data/clex-4.6.patch8/src/start.c
Examining data/clex-4.6.patch8/src/tty.c
Examining data/clex-4.6.patch8/src/tty.h
Examining data/clex-4.6.patch8/src/undo.c
Examining data/clex-4.6.patch8/src/undo.h
Examining data/clex-4.6.patch8/src/userdata.c
Examining data/clex-4.6.patch8/src/userdata.h
Examining data/clex-4.6.patch8/src/ustring.c
Examining data/clex-4.6.patch8/src/ustring.h
Examining data/clex-4.6.patch8/src/ustringutil.c
Examining data/clex-4.6.patch8/src/ustringutil.h
Examining data/clex-4.6.patch8/src/util.c
Examining data/clex-4.6.patch8/src/util.h
Examining data/clex-4.6.patch8/src/xterm_title.c
Examining data/clex-4.6.patch8/src/xterm_title.h

FINAL RESULTS:

data/clex-4.6.patch8/src/ustringutil.c:58:9:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
		len = readlink(path,pustr->USstr,pustr->USalloc);
data/clex-4.6.patch8/src/cfg.c:239:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(dst_str,src_str);
data/clex-4.6.patch8/src/cfg.c:367:5:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
				wcscpy(((CSTR *)pce->table)->current,wvalue);
data/clex-4.6.patch8/src/cfg.c:449:2:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
	swprintf(buff,ARRAY_SIZE(buff),L"%d",pnum->new);
data/clex-4.6.patch8/src/cfg.c:527:2:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
	swprintf(prompt,ARRAY_SIZE(prompt),L"%s (range: %d - %d%s%ls): ",
data/clex-4.6.patch8/src/cfg.c:545:2:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
	swprintf(prompt,ARRAY_SIZE(prompt),L"%s (" STR(CFGVALUE_LEN) " chars max%s%ls): ",
data/clex-4.6.patch8/src/cfg.c:602:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(pstr->new,USTR(textline->line));
data/clex-4.6.patch8/src/completion.c:259:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(msg,ARRAY_SIZE(msg),L"%d additional entries not shown (table full)",compl.cnt - cc_alloc);
data/clex-4.6.patch8/src/exec.c:153:4:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
			wcscpy(dst,append);
data/clex-4.6.patch8/src/exec.c:209: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(user_data.shell,user_data.shell,"-c",command,(char *)0);
data/clex-4.6.patch8/src/exec.c:245:5:  [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.
				system(user_data.shell);
data/clex-4.6.patch8/src/inout.c:587: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(buffer,lang_data.utf8 ? "U+" : "\\x");
data/clex-4.6.patch8/src/inout.c:1031:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(buffer,ARRAY_SIZE(buffer),L"( %dx%d )",disp_data.scrcols,disp_data.scrlines);
data/clex-4.6.patch8/src/inout.c:1059:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(selected,ARRAY_SIZE(selected),L" [%d]",ppanel_file->selected);
data/clex-4.6.patch8/src/inout.c:1064:2:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
	swprintf(buffer,ARRAY_SIZE(buffer),L"<%ls %d/%d %ls>",
data/clex-4.6.patch8/src/inout.c:1130: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(perms + 0,((octal[0] - '0') & 4 ? set2 : set1)[(octal[1] - '0') & 7]);
data/clex-4.6.patch8/src/inout.c:1131: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(perms + 3,((octal[0] - '0') & 2 ? set2 : set1)[(octal[2] - '0') & 7]);
data/clex-4.6.patch8/src/inout.c:1132: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(perms + 6,((octal[0] - '0') & 1 ? set3 : set1)[(octal[3] - '0') & 7]);
data/clex-4.6.patch8/src/inout.c:1654:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(txt,ARRAY_SIZE(buf),L"%4d + %d%ls",p1,p2,
data/clex-4.6.patch8/src/inout.c:1661:4:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
			swprintf(txt,ARRAY_SIZE(buf),L"%4d + %d",p1,p2);
data/clex-4.6.patch8/src/inout.c:1666:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(txt,ARRAY_SIZE(buf),L"  %4d",panel_cmp_sum.names);
data/clex-4.6.patch8/src/inout.c:1671:4:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
			swprintf(txt,ARRAY_SIZE(buf),L"  %4d",p1);
data/clex-4.6.patch8/src/inout.c:1676:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(txt,ARRAY_SIZE(buf),L"  %4d",panel_cmp_sum.errors);
data/clex-4.6.patch8/src/inout.c:1680:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(txt,ARRAY_SIZE(buf),L"  %4d",panel_cmp_sum.equal);
data/clex-4.6.patch8/src/list.c:487:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(str,"%*s",major_len,"..");
data/clex-4.6.patch8/src/list.c:536:3:  [4] (format) swprintf:
  Potential format string problem (CWE-134). Make format string constant.
		swprintf(number,ARRAY_SIZE(number),L"%u",id);
data/clex-4.6.patch8/src/list.c:546:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(dst,name);
data/clex-4.6.patch8/src/list.c:618:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(str,uid2name(uid));
data/clex-4.6.patch8/src/list.c:620:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(str + FE_NAME_STR,gid2name(gid));
data/clex-4.6.patch8/src/sdstring.c:68: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(psd->SDmem,src);
data/clex-4.6.patch8/src/sdstring.c:119:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(mem,psd2->SDmem);
data/clex-4.6.patch8/src/sdstring.c:120:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(psd2->SDmem,psd1->SDmem);
data/clex-4.6.patch8/src/sdstring.c:121:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(psd1->SDmem,mem);
data/clex-4.6.patch8/src/sdstring.c:133:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(psd->SDmem,src);
data/clex-4.6.patch8/src/ustring.c:184: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(pustr->USstr,src);
data/clex-4.6.patch8/src/ustring.c:197:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(pustr->USstr,src);
data/clex-4.6.patch8/src/ustring.c:245: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(pustr->USstr + len,str);
data/clex-4.6.patch8/src/ustring.c:267:3:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
		wcscpy(pustr->USstr + len,str);
data/clex-4.6.patch8/src/ustringutil.c:88: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.
		len = vsnprintf(pustr->USstr,pustr->USalloc,format,ap);
data/clex-4.6.patch8/src/util.c:107: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(dup,str);
data/clex-4.6.patch8/src/util.c:120:2:  [4] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer.
	wcscpy(dup,str);
data/clex-4.6.patch8/src/util.c:141: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(str,dir);
data/clex-4.6.patch8/src/util.c:157: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(USTR(path_buff) + path_dirlen,file);
data/clex-4.6.patch8/src/xterm_title.c:93:3:  [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("xprop", "xprop", "-id", wid, "WM_NAME", (char *)0);
data/clex-4.6.patch8/src/completion.c:115:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ( (path = getenv("PATH")) == 0) {
data/clex-4.6.patch8/src/filepanel.c:83: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.
		try_all_parents(checkabs(getenv("PWD")) ? getenv("PWD") : user_data.homedir);
data/clex-4.6.patch8/src/filepanel.c:83:45:  [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.
		try_all_parents(checkabs(getenv("PWD")) ? getenv("PWD") : user_data.homedir);
data/clex-4.6.patch8/src/inout.c:224:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ( (term = getenv("TERM")) ) {
data/clex-4.6.patch8/src/inout.c:242:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	disp_data.xwin = getenv("WINDOWID") && getenv("DISPLAY");
data/clex-4.6.patch8/src/inout.c:242:41:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	disp_data.xwin = getenv("WINDOWID") && getenv("DISPLAY");
data/clex-4.6.patch8/src/kbd-test.c:58: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.
	term = getenv("TERM");
data/clex-4.6.patch8/src/userdata.c:323: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 (checkabs(name = getenv("SHELL")))
data/clex-4.6.patch8/src/userdata.c:336: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 (checkabs(name = getenv("HOME"))) {
data/clex-4.6.patch8/src/userdata.c:368: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.
	xdg = getenv("XDG_CONFIG_HOME");
data/clex-4.6.patch8/src/xterm_title.c:63:14:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if ( (wid = getenv("WINDOWID")) == 0)
data/clex-4.6.patch8/src/cfg.c:49:8:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	const wchar_t *desc[4];		/* if defined - show this text instead
data/clex-4.6.patch8/src/cfg.c:102:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t current[CFGVALUE_LEN + 1], new[CFGVALUE_LEN + 1];
data/clex-4.6.patch8/src/cfg.c:439:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 wchar_t buff[16];
data/clex-4.6.patch8/src/cfg.c:521:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t prompt[CFGVAR_LEN + 48];
data/clex-4.6.patch8/src/cfg.c:539:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t prompt[CFGVAR_LEN + 32];
data/clex-4.6.patch8/src/cfg.h:18:28:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 cfg_str(X) ((const wchar_t *)pcfg[X])
data/clex-4.6.patch8/src/clex.h: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 pidstr[16];			/* PID as a string */
data/clex-4.6.patch8/src/clex.h:175:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t line[INPUT_STR];	/* user's input */
data/clex-4.6.patch8/src/clex.h:334:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t atime_str[FE_TIME_STR];	/* access time */
data/clex-4.6.patch8/src/clex.h:335:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t ctime_str[FE_TIME_STR];	/* inode change time */
data/clex-4.6.patch8/src/clex.h:336:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t mtime_str[FE_TIME_STR];	/* file modification time */
data/clex-4.6.patch8/src/clex.h:337:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t owner_str[FE_OWNER_STR];/* owner and group */
data/clex-4.6.patch8/src/clex.h:338: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 age_str[FE_AGE_STR];		/* time since the last modification ("file age") */
data/clex-4.6.patch8/src/clex.h:339: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 links_str[FE_LINKS_STR];	/* number of links */
data/clex-4.6.patch8/src/clex.h:340: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 mode_str[FE_MODE_STR];		/* file mode - octal number */
data/clex-4.6.patch8/src/clex.h:341: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 size_str[FE_SIZE_DEV_STR];	/* file size or dev major/minor */
data/clex-4.6.patch8/src/clex.h:601:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char timestamp[TIMESTAMP_STR];	/* time/date as a string */
data/clex-4.6.patch8/src/cmp.c:73: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 buff[CMP_TOTAL_ + 1];
data/clex-4.6.patch8/src/cmp.c:117: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 buff1[CMP_BUF_STR], buff2[CMP_BUF_STR];
data/clex-4.6.patch8/src/cmp.c:161:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd1 = open(file1,O_RDONLY | O_NONBLOCK);
data/clex-4.6.patch8/src/cmp.c:166:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd2 = open(file2,O_RDONLY | O_NONBLOCK);
data/clex-4.6.patch8/src/completion.c:256:9:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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 wchar_t msg[80];	/* win_sethelp() stores this ptr */
data/clex-4.6.patch8/src/control.c:579: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.
	const char *helppages[MAIN_LINKS - 1];	/* corresponding help page(s) */
data/clex-4.6.patch8/src/edit.c:775:4:  [2] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer. Risk is low because the source is a constant string.
			wcscpy(p,L"> ");
data/clex-4.6.patch8/src/exec.c:90:15:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const wchar_t *promptchar[3]
data/clex-4.6.patch8/src/exec.c:102:3:  [2] (buffer) wcscpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using a function version that stops copying at the end
  of the buffer. Risk is low because the source is a constant string.
		wcscpy(dst,L"ROOT ");
data/clex-4.6.patch8/src/filerw.c:61:13:  [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(filename,O_RDONLY | O_NONBLOCK)) < 0) {
data/clex-4.6.patch8/src/filerw.c:296:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	USTRING file, tmpfile;	/* destination file name, temporary file name */
data/clex-4.6.patch8/src/filerw.c:317:21:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			us_cat(&wfile[i].tmpfile,file,"-",clex_data.pidstr,".tmp",(char *)0);
data/clex-4.6.patch8/src/filerw.c:327:16:  [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).
	wfile[i].fp = fopen(USTR(wfile[i].tmpfile),"w");
data/clex-4.6.patch8/src/filerw.c:327:36:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	wfile[i].fp = fopen(USTR(wfile[i].tmpfile),"w");
data/clex-4.6.patch8/src/filerw.c:332:68:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		msgout(MSG_NOTICE,"Cannot open \"%s\" for writing",USTR(wfile[i].tmpfile));
data/clex-4.6.patch8/src/filerw.c:335:22:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		us_reset(&wfile[i].tmpfile);
data/clex-4.6.patch8/src/filerw.c:344:21:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	const char *file, *tmpfile;
data/clex-4.6.patch8/src/filerw.c:358:26:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	tmpfile = USTR(wfile[i].tmpfile);
data/clex-4.6.patch8/src/filerw.c:363:54:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		msgout(MSG_NOTICE,"Could not write data to \"%s\"",tmpfile);
data/clex-4.6.patch8/src/filerw.c:365:40:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	else if ( errno = 0, errflag = rename(tmpfile,file) ) {
data/clex-4.6.patch8/src/filerw.c:367:57:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		msgout(MSG_NOTICE,"Could not rename \"%s\" to \"%s\"",tmpfile,base_name(file));
data/clex-4.6.patch8/src/filerw.c:374:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	unlink(tmpfile);
data/clex-4.6.patch8/src/filerw.c:375:21:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	us_reset(&wfile[i].tmpfile);
data/clex-4.6.patch8/src/filerw.c:385:14:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	const char *tmpfile;
data/clex-4.6.patch8/src/filerw.c:388:27:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		tmpfile = USTR(wfile[i].tmpfile);
data/clex-4.6.patch8/src/filerw.c:389:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		if (tmpfile && *tmpfile == '/')
data/clex-4.6.patch8/src/filerw.c:390:11:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
			unlink(tmpfile);
data/clex-4.6.patch8/src/filter.c:59: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 buff[FOPT_TOTAL_ + 1];
data/clex-4.6.patch8/src/inout.c:584: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 buffer[24];
data/clex-4.6.patch8/src/inout.c:588:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(buffer + 2,"%0*X",value > 0xFF ? 4 : 2,value);
data/clex-4.6.patch8/src/inout.c:1028:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t buffer[64], selected[32], *hidden;
data/clex-4.6.patch8/src/inout.c:1121:15:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const char
data/clex-4.6.patch8/src/inout.c:1128: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 perms[10];
data/clex-4.6.patch8/src/inout.c:1616:15:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const wchar_t *description[CMP_TOTAL_ + 1] = {
data/clex-4.6.patch8/src/inout.c:1641:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t *txt, buf[64];
data/clex-4.6.patch8/src/inout.c:1762:15:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const wchar_t *description[FOPT_TOTAL_] = {
data/clex-4.6.patch8/src/inout.c:1878:15:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const wchar_t *description[NOTIF_TOTAL_] = {
data/clex-4.6.patch8/src/inout.c:1936:15:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static const wchar_t
data/clex-4.6.patch8/src/kbd-test.c:40:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t keystr[2];
data/clex-4.6.patch8/src/list.c:84:14:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const wchar_t *td_fmt[3];	/* time/date formats (man strftime, man wcsftime) */
data/clex-4.6.patch8/src/list.c:118:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t tmp[80];
data/clex-4.6.patch8/src/list.c:352:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(str,"  future!");
data/clex-4.6.patch8/src/list.c:356:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(str,"         ");
data/clex-4.6.patch8/src/list.c:365:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"%3d:%02d:%02d",-h,m,s);
data/clex-4.6.patch8/src/list.c:367:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"   %3d:%02d",-m,s);
data/clex-4.6.patch8/src/list.c:369:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"      %3d",-s);
data/clex-4.6.patch8/src/list.c:371:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(str,"       -0");
data/clex-4.6.patch8/src/list.c:388:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(str,"  %7ld%c",(long int)(size + roundup)," KMGTPEZY"[exp]);
data/clex-4.6.patch8/src/list.c:420:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(str,"      %3d%c",(int)(size + roundup)," KMGTPEZY"[exp]);
data/clex-4.6.patch8/src/list.c:489:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"%*d",major_len,dev_major);
data/clex-4.6.patch8/src/list.c:493:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str + major_len,":..%0*X",
data/clex-4.6.patch8/src/list.c:496:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str + major_len,":%0*X",minor_len,dev_minor);
data/clex-4.6.patch8/src/list.c:533:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t number[16];
data/clex-4.6.patch8/src/list.c:569:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		wchar_t name[FE_NAME_STR];
data/clex-4.6.patch8/src/list.c:595:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		wchar_t name[FE_NAME_STR];
data/clex-4.6.patch8/src/list.c:627:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(str,"%3d",(int)nlink);
data/clex-4.6.patch8/src/list.c:629:3:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
		strcpy(str,"max");
data/clex-4.6.patch8/src/list.c:704:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pfe->mode_str,"%04o",pfe->mode12);
data/clex-4.6.patch8/src/list.c:724:4:  [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(pfe->size_str,"           ");
data/clex-4.6.patch8/src/log.c:77:16:  [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 ( (logfp = fopen(logfile,"a")) == 0)
data/clex-4.6.patch8/src/notify.c:36: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 buff[NOTIF_TOTAL_ + 1];
data/clex-4.6.patch8/src/sdstring.c:113:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t *name, mem[SDSTRING_LEN + 1];
data/clex-4.6.patch8/src/sdstring.h:4: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 SDmem[SDSTRING_LEN + 1];	/* string if short, otherwise null string */
data/clex-4.6.patch8/src/sdstring.h:9:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t SDmem[SDSTRING_LEN + 1];	/* string if short, otherwise null string */
data/clex-4.6.patch8/src/sort.c:124: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 buff[4] = "???";
data/clex-4.6.patch8/src/start.c:224:2:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
	sprintf(clex_data.pidstr,"%d",(int)clex_data.pid);
data/clex-4.6.patch8/src/userdata.c:274: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 uidstr[24];
data/clex-4.6.patch8/src/userdata.c:312:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(uidstr,"%d",(int)myuid);
data/clex-4.6.patch8/src/userdata.c:315:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(uidstr,"UID_%d",(int)myuid);
data/clex-4.6.patch8/src/ustringutil.c:31:30:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#    define va_copy(dst,src) memcpy(&dst,&src,sizeof(va_list))
data/clex-4.6.patch8/src/xterm_title.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 *p1, *p2, title[192];
data/clex-4.6.patch8/src/xterm_title.c:80:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		efd = open("/dev/null",O_RDONLY);
data/clex-4.6.patch8/src/xterm_title.c:166:2:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	wchar_t wch, title_cmdw[CMD_STR];
data/clex-4.6.patch8/src/cfg.c:355:58:  [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 (sscanf(value," %d %n",&nvalue,&len) < 1 || len != strlen(value))
data/clex-4.6.patch8/src/cfg.c:364:8:  [1] (buffer) wcslen:
  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 (wcslen(wvalue) > CFGVALUE_LEN)
data/clex-4.6.patch8/src/cfg.c:406:7:  [1] (buffer) wcslen:
  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 (wcslen(config[i].help) > MIN_COLS - 4)
data/clex-4.6.patch8/src/clex.h:131:9:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	mode_t umask;				/* umask value */
data/clex-4.6.patch8/src/clex.h:668:39:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
	int nonreg1, nonreg2, errors, names, equal;
data/clex-4.6.patch8/src/completion.c:79: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).
	int strlen;			/* length of 'str' */
data/clex-4.6.patch8/src/completion.c:338:16:  [1] (buffer) wcslen:
  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).
		compl.clen = wcslen(cand0) - rq.strlen;
data/clex-4.6.patch8/src/completion.c:338: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).
		compl.clen = wcslen(cand0) - rq.strlen;
data/clex-4.6.patch8/src/completion.c:355:54:  [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 (rq.strlen == 0 || wcsncmp(enw[i].var,rq.str,rq.strlen) == 0)
data/clex-4.6.patch8/src/completion.c:366:39:  [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 (wcsncmp(USTR(ph->cmd),rq.str,rq.strlen) == 0)
data/clex-4.6.patch8/src/completion.c:376:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	username_find_init(rq.str,rq.strlen);
data/clex-4.6.patch8/src/completion.c:386:32:  [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).
	groupname_find_init(rq.str,rq.strlen);
data/clex-4.6.patch8/src/completion.c:426: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).
		else if (wcsncmp(filew,rq.str,rq.strlen))
data/clex-4.6.patch8/src/completion.c:530: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 (wcsncmp(filew,rq.str,rq.strlen) != 0)
data/clex-4.6.patch8/src/completion.c:595:41:  [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).
	edit_nu_insertstr(SDSTR(pcc->str) + rq.strlen,rq.qlevel);
data/clex-4.6.patch8/src/completion.c:664:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		sdw_copyn(&common,SDSTR(cc_list[0].str) + rq.strlen,compl.clen);
data/clex-4.6.patch8/src/completion.c:734:48:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rq.str = usw_copyn(&str_buff,pline + start,rq.strlen);
data/clex-4.6.patch8/src/completion.c:931: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).
		rq.strlen = usw_dequote(&dequote_str,rq.str,rq.strlen);
data/clex-4.6.patch8/src/completion.c:935: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).
		rq.str = usw_copyn(&dequote_str,rq.str,rq.strlen);
data/clex-4.6.patch8/src/directory.c:452:33:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		else if (dir[0] == ' ' || dir[strlen(dir) - 1] == ' ')
data/clex-4.6.patch8/src/edit.c:441:36:  [1] (buffer) wcslen:
  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).
	textline->curs = textline->size = wcslen(str);
data/clex-4.6.patch8/src/edit.c:571:5:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				wcsncpy(insert_space(cnt),src,cnt);
data/clex-4.6.patch8/src/exec.c:64:8:  [1] (buffer) wcslen:
  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 = wcslen(user_data.homedirw);
data/clex-4.6.patch8/src/exec.c:72:8:  [1] (buffer) wcslen:
  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 = wcslen(pdir);
data/clex-4.6.patch8/src/exec.c:82:2:  [1] (buffer) wcsncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
	wcsncpy(pshort,L"...",3);
data/clex-4.6.patch8/src/exec.c:135:20:  [1] (buffer) wcslen:
  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).
			len1 = append ? wcslen(append) : 0;
data/clex-4.6.patch8/src/filepanel.c:57:4:  [1] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant character.
			strcpy(dir,"/");
data/clex-4.6.patch8/src/filerw.c:325:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask | 022);
data/clex-4.6.patch8/src/filerw.c:325:18:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask | 022);
data/clex-4.6.patch8/src/filerw.c:329:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask);
data/clex-4.6.patch8/src/filerw.c:329:18:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask);
data/clex-4.6.patch8/src/inout.c:226:31:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			if (strncmp(term,compat[i],strlen(compat[i])) == 0) {
data/clex-4.6.patch8/src/inout.c:233: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).
					if (strncmp(term,not_compat[i],strlen(not_compat[i])) == 0) {
data/clex-4.6.patch8/src/inout.c:428:20:  [1] (buffer) wcslen:
  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 (x < 0 || x >= wcslen(bar) || bar[x] == L' ')
data/clex-4.6.patch8/src/inout.c:665:34:  [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 (strncmp(name,keytable[i].n,strlen(keytable[i].n)) == 0)
data/clex-4.6.patch8/src/inout.c:766:9:  [1] (buffer) wcslen:
  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 = wcslen(str);
data/clex-4.6.patch8/src/inout.c:847: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).
	chcnt = strlen(str);
data/clex-4.6.patch8/src/inout.c:1514:8:  [1] (buffer) wcslen:
  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 = wcslen(str);
data/clex-4.6.patch8/src/inout.c:1680:55:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
		swprintf(txt,ARRAY_SIZE(buf),L"  %4d",panel_cmp_sum.equal);
data/clex-4.6.patch8/src/lang.c:35: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(info) == 1) {
data/clex-4.6.patch8/src/lang.c:44: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(info) == 1) {
data/clex-4.6.patch8/src/lex.c:36:8:  [1] (buffer) wcslen:
  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 = wcslen(cmd);
data/clex-4.6.patch8/src/list.c:286:34:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	normal_dir  = 0777 & ~clex_data.umask;	/* dir or executable file */
data/clex-4.6.patch8/src/list.c:287:34:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	normal_file = 0666 & ~clex_data.umask;	/* any other file */
data/clex-4.6.patch8/src/list.c:540:8:  [1] (buffer) wcslen:
  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 = wcslen(name);
data/clex-4.6.patch8/src/list.c:1029:32:  [1] (buffer) wcslen:
  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).
			usw_dequote(&dequote,filter,wcslen(filter));
data/clex-4.6.patch8/src/mbwstring.c:62: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).
	max = usw_setsize(dst,strlen(src) + 1);
data/clex-4.6.patch8/src/mbwstring.c:109:23:  [1] (buffer) wcslen:
  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).
	max = us_setsize(dst,wcslen(src) + 1);
data/clex-4.6.patch8/src/sdstring.c:66: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(src) <= SDSTRING_LEN) {
data/clex-4.6.patch8/src/sdstring.c:131:6:  [1] (buffer) wcslen:
  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 (wcslen(src) <= SDSTRING_LEN) {
data/clex-4.6.patch8/src/sort.c:163: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).
	for (i1 = strlen(s1), i2 = strlen(s2); i1 > 0 && i2 > 0;) {
data/clex-4.6.patch8/src/sort.c:163: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).
	for (i1 = strlen(s1), i2 = strlen(s2); i1 > 0 && i2 > 0;) {
data/clex-4.6.patch8/src/start.c:221:20:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	clex_data.umask = umask(0777);
data/clex-4.6.patch8/src/start.c:222:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask);
data/clex-4.6.patch8/src/start.c:222:18:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(clex_data.umask);
data/clex-4.6.patch8/src/tty.c:146:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while ((in = getchar()) == EOF) {
data/clex-4.6.patch8/src/userdata.c:265: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(shell);
data/clex-4.6.patch8/src/userdata.c:656:9:  [1] (buffer) wcslen:
  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 = wcslen(login);
data/clex-4.6.patch8/src/ustring.c:183: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).
	us_setsize(pustr,strlen(src) + 1);
data/clex-4.6.patch8/src/ustring.c:196:20:  [1] (buffer) wcslen:
  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).
	usw_setsize(pustr,wcslen(src) + 1);
data/clex-4.6.patch8/src/ustring.c:239: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).
		len += strlen(str);
data/clex-4.6.patch8/src/ustring.c:246: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).
		len += strlen(str);
data/clex-4.6.patch8/src/ustring.c:261:10:  [1] (buffer) wcslen:
  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 += wcslen(str);
data/clex-4.6.patch8/src/ustring.c:268:10:  [1] (buffer) wcslen:
  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 += wcslen(str);
data/clex-4.6.patch8/src/ustringutil.c:80: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(format);
data/clex-4.6.patch8/src/util.c:106: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).
	dup = emalloc(strlen(str) + 1);
data/clex-4.6.patch8/src/util.c:119:17:  [1] (buffer) wcslen:
  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).
	dup = emalloc((wcslen(str) + 1) * sizeof(wchar_t));
data/clex-4.6.patch8/src/util.c:137: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).
	path_dirlen = strlen(dir);
data/clex-4.6.patch8/src/util.c:156: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).
	us_resize(&path_buff,path_dirlen + strlen(file) + 1);
data/clex-4.6.patch8/src/util.c:174:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		rd = read(fd,buff + total,bytes);
data/clex-4.6.patch8/src/util.c:189:8:  [1] (buffer) wcslen:
  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 = wcslen(str);	

ANALYSIS SUMMARY:

Hits = 216
Lines analyzed = 16797 in approximately 0.46 seconds (36312 lines/second)
Physical Source Lines of Code (SLOC) = 13018
Hits@level = [0]  16 [1]  71 [2]  90 [3]  11 [4]  43 [5]   1
Hits@level+ = [0+] 232 [1+] 216 [2+] 145 [3+]  55 [4+]  44 [5+]   1
Hits/KSLOC@level+ = [0+] 17.8215 [1+] 16.5924 [2+] 11.1384 [3+] 4.22492 [4+] 3.37994 [5+] 0.0768167
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.