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/pspg-3.1.5/src/args.c
Examining data/pspg-3.1.5/src/commands.c
Examining data/pspg-3.1.5/src/commands.h
Examining data/pspg-3.1.5/src/config.c
Examining data/pspg-3.1.5/src/config.h
Examining data/pspg-3.1.5/src/file.c
Examining data/pspg-3.1.5/src/infra.c
Examining data/pspg-3.1.5/src/menu.c
Examining data/pspg-3.1.5/src/pgclient.c
Examining data/pspg-3.1.5/src/pretty-csv.c
Examining data/pspg-3.1.5/src/print.c
Examining data/pspg-3.1.5/src/pspg.c
Examining data/pspg-3.1.5/src/pspg.h
Examining data/pspg-3.1.5/src/sort.c
Examining data/pspg-3.1.5/src/st_curses.h
Examining data/pspg-3.1.5/src/st_menu.c
Examining data/pspg-3.1.5/src/st_menu.h
Examining data/pspg-3.1.5/src/st_menu_styles.c
Examining data/pspg-3.1.5/src/st_panel.h
Examining data/pspg-3.1.5/src/string.c
Examining data/pspg-3.1.5/src/table.c
Examining data/pspg-3.1.5/src/themes.c
Examining data/pspg-3.1.5/src/themes.h
Examining data/pspg-3.1.5/src/unicode.c
Examining data/pspg-3.1.5/src/unicode.h

FINAL RESULTS:

data/pspg-3.1.5/src/infra.c:53:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(current_state->logfile, fmt, args);
data/pspg-3.1.5/src/infra.c:62:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(debug_pipe, fmt, args);
data/pspg-3.1.5/src/infra.c:87:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, fmt, args);
data/pspg-3.1.5/src/infra.c:97:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		vfprintf(current_state->logfile, fmt, args);
data/pspg-3.1.5/src/infra.c:107:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(debug_pipe, fmt, args);
data/pspg-3.1.5/src/infra.c:126:2:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	vsnprintf(pspg_errstr_buffer, PSPG_ERRSTR_BUFFER_SIZE, fmt, args);
data/pspg-3.1.5/src/pgclient.c:250:14:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
		password = getpass("Password: ");
data/pspg-3.1.5/src/pgclient.c:271:14:  [4] (misc) getpass:
  This function is obsolete and not portable. It was in SUSv2 but removed by
  POSIX.2. What it does exactly varies considerably between systems,
  particularly in where its prompt is displayed and where it gets its data
  (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations
  overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do
  exactly what you want. If you continue to use it, or write your own, be
  sure to zero the password as soon as possible to avoid leaving the
  cleartext password visible in the process' address space.
		password = getpass("Password: ");
data/pspg-3.1.5/src/pgclient.c:284:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(errmsg, "Connection to database failed: %s", PQerrorMessage(conn));
data/pspg-3.1.5/src/pgclient.c:295:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(errmsg, "Query doesn't return data: %s", PQerrorMessage(conn));
data/pspg-3.1.5/src/pgclient.c:338: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(locbuf, name);
data/pspg-3.1.5/src/pgclient.c:382: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(locbuf, value);
data/pspg-3.1.5/src/pretty-csv.c:858:8:  [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(locbuf, oldrow->fields[j]);
data/pspg-3.1.5/src/pretty-csv.c:867:7:  [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(locbuf, nullstr);
data/pspg-3.1.5/src/print.c:730: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(p, rowstr);
data/pspg-3.1.5/src/print.c:1267: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(p, rowstr);
data/pspg-3.1.5/src/pspg.c:969: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(readline_buffer, line);
data/pspg-3.1.5/src/pspg.c:1982:11:  [4] (shell) popen:
  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.
			fout = popen(pagerprog, "w");
data/pspg-3.1.5/src/pspg.c:4164:9:  [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, path);
data/pspg-3.1.5/src/st_menu.c:2573: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(dest, src);
data/pspg-3.1.5/src/args.c:223:16:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	while ((opt = getopt_long(argc, argv, "abs:c:d:f:h:p:XVFgGiIq:U:w:W",
data/pspg-3.1.5/src/file.c:45:17:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
			char *home = getenv("HOME");
data/pspg-3.1.5/src/pgclient.c:262:47:  [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.
	keywords[6] = "client_encoding"; values[6] = getenv("PGCLIENTENCODING") ? NULL : "auto";
data/pspg-3.1.5/src/pspg.c:1770: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.
	pspgenv = getenv("PSPG");
data/pspg-3.1.5/src/pspg.c:1968: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.
		pagerprog = getenv("PSPG_PAGER");
data/pspg-3.1.5/src/pspg.c:1970: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.
			pagerprog = getenv("PAGER");
data/pspg-3.1.5/src/args.c:319:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				opts->watch_time = atoi(optarg);
data/pspg-3.1.5/src/args.c:386:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				n = atoi(optarg);
data/pspg-3.1.5/src/args.c:410: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).
				state->reserved_rows = atoi(optarg);
data/pspg-3.1.5/src/args.c:455:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				state->boot_wait = atoi(optarg);
data/pspg-3.1.5/src/args.c:463:26:  [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).
				state->hold_stream = atoi(optarg);
data/pspg-3.1.5/src/args.c:531:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				n = atoi(optarg);
data/pspg-3.1.5/src/args.c:540:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				n = atoi(optarg);
data/pspg-3.1.5/src/args.c:621: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		buffer[4];
data/pspg-3.1.5/src/config.c:57:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			*int_val = atoi(line);
data/pspg-3.1.5/src/config.c:89: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(path, "w");
data/pspg-3.1.5/src/config.c:142: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(path, "r");
data/pspg-3.1.5/src/config.c:148:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char	key[100];
data/pspg-3.1.5/src/file.c:31: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[MAXPATHLEN];
data/pspg-3.1.5/src/file.c:90: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).
		state->fp = fopen(pathname, "r");
data/pspg-3.1.5/src/pgclient.c:26:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char errmsg[1024];
data/pspg-3.1.5/src/pgclient.c:240: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 *keywords[8];
data/pspg-3.1.5/src/pgclient.c:241: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 *values[8];
data/pspg-3.1.5/src/pretty-csv.c:88: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(line, printbuf->buffer, printbuf->used);
data/pspg-3.1.5/src/pretty-csv.c:115: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(printbuf->buffer + printbuf->used, str, size);
data/pspg-3.1.5/src/pretty-csv.c:149:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(printbuf->buffer + printbuf->used, str, size);
data/pspg-3.1.5/src/pretty-csv.c:413: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	buffer[20];
data/pspg-3.1.5/src/pretty-csv.c:438:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char	   *fields[1024];
data/pspg-3.1.5/src/pretty-csv.c:1051:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(locbuf, linebuf->buffer, linebuf->used);
data/pspg-3.1.5/src/pretty-csv.c:1297:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(locbuf, linebuf->buffer + linebuf->starts[i], linebuf->sizes[i]);
data/pspg-3.1.5/src/print.c:414: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		buffer[10];
data/pspg-3.1.5/src/print.c:1097: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 result[20];
data/pspg-3.1.5/src/pspg.c:103: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		readline_buffer[1024];
data/pspg-3.1.5/src/pspg.c:115: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		last_row_search[256];
data/pspg-3.1.5/src/pspg.c:116: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		last_col_search[256];
data/pspg-3.1.5/src/pspg.c:117: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		last_line[256];
data/pspg-3.1.5/src/pspg.c:118: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		last_path[1025];
data/pspg-3.1.5/src/pspg.c:122: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		last_history[256];
data/pspg-3.1.5/src/pspg.c:155:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char pspg_errstr_buffer[PSPG_ERRSTR_BUFFER_SIZE];
data/pspg-3.1.5/src/pspg.c:607: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	buffer[200];
data/pspg-3.1.5/src/pspg.c:792: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	title[65];
data/pspg-3.1.5/src/pspg.c:811:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, str, sz);
data/pspg-3.1.5/src/pspg.c:1302: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	buffer[20];
data/pspg-3.1.5/src/pspg.c:1360: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		buff[64];
data/pspg-3.1.5/src/pspg.c:1523: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(buffer, ", bstate: %08lx", (unsigned long) mevent->bstate);
data/pspg-3.1.5/src/pspg.c:1595:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(new->searchterm, old->searchterm, 255);
data/pspg-3.1.5/src/pspg.c:1599:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(new->searchcolterm, old->searchcolterm, 255);
data/pspg-3.1.5/src/pspg.c:1746: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).
	debug_pipe = fopen(DEBUG_PIPE, "w");
data/pspg-3.1.5/src/pspg.c:1801: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).
		state.logfile = fopen(pathname, "a");
data/pspg-3.1.5/src/pspg.c:2036: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).
		state.tty = fopen("/dev/tty", "r+");
data/pspg-3.1.5/src/pspg.c:2038: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).
			state.tty = fopen(ttyname(fileno(stdout)), "r");
data/pspg-3.1.5/src/pspg.c:2187:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(&aux, &scrdesc, sizeof(ScrDesc));
data/pspg-3.1.5/src/pspg.c:2725:8:  [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(&aux, &scrdesc, sizeof(ScrDesc));
data/pspg-3.1.5/src/pspg.c:4027: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	linenotxt[256];
data/pspg-3.1.5/src/pspg.c:4110: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	buffer[MAXPATHLEN + 1024];
data/pspg-3.1.5/src/pspg.c:4125:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
						fp = fopen(path, "w");
data/pspg-3.1.5/src/pspg.c:4177: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	locsearchterm[256];
data/pspg-3.1.5/src/pspg.c:4317: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	locsearchterm[256];
data/pspg-3.1.5/src/pspg.c:4481:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (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	locsearchterm[256];
data/pspg-3.1.5/src/pspg.h:55:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char   *rows[1000];
data/pspg-3.1.5/src/pspg.h:117: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	title[65];				/* detected title (trimmed) or NULL */
data/pspg-3.1.5/src/pspg.h:119: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	filename[65];			/* filename (printed on top bar) */
data/pspg-3.1.5/src/pspg.h:167:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	searchterm[256];		/* currently active search input */
data/pspg-3.1.5/src/pspg.h:177: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	searchcolterm[256];		/* last searched column patterm */
data/pspg-3.1.5/src/pspg.h:223: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	types[1024];			/* a or d .. content in column */
data/pspg-3.1.5/src/pspg.h:248:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char	pathname[MAXPATHLEN];		/* transformed path to input source */
data/pspg-3.1.5/src/pspg.h:280:8:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
extern char pspg_errstr_buffer[PSPG_ERRSTR_BUFFER_SIZE];
data/pspg-3.1.5/src/st_menu.c:263: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	buffer[20];
data/pspg-3.1.5/src/st_menu.c:290: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 buffer2[10];
data/pspg-3.1.5/src/st_menu.c:1743: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	buffer[20];
data/pspg-3.1.5/src/st_menu.c:2583:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(dest, src, chrlen);
data/pspg-3.1.5/src/table.c:381: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	statbuf[STATBUF_SIZE];
data/pspg-3.1.5/src/table.c:406: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(dynbuf + fetched_chars, statbuf, len + 1);
data/pspg-3.1.5/src/table.c:1229:4:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
			char		buffer[TEXT_STACK_BUFFER_SIZE];
data/pspg-3.1.5/src/table.c:1305: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		buffer[BUFFER_MAX_SIZE];
data/pspg-3.1.5/src/table.c:1381:8:  [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(_nullstr, saved_str, len);
data/pspg-3.1.5/src/table.c:1395:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(buffptr, str, charlen);
data/pspg-3.1.5/src/args.c:128: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).
		copybuf = (char *) smalloc(strlen(input) + 1);
data/pspg-3.1.5/src/args.c:626: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).
	l = strlen(path);
data/pspg-3.1.5/src/config.c:138:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t		read;
data/pspg-3.1.5/src/infra.c:37: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(asct);
data/pspg-3.1.5/src/pgclient.c:129:43:  [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 utf_string_dsplen_multiline(str, strlen(str), multiline, false, &digits, &others);
data/pspg-3.1.5/src/pgclient.c:162: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).
	endnames = names + strlen(names);
data/pspg-3.1.5/src/pgclient.c:181: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).
				size_t		len = strlen(ptr);
data/pspg-3.1.5/src/pgclient.c:190: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).
					size_t		len2 = strlen(fieldname);
data/pspg-3.1.5/src/pgclient.c:200: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).
			ptr += strlen(ptr) + 1;
data/pspg-3.1.5/src/pgclient.c:316: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).
			size += strlen(PQfname(result, i)) + 1;
data/pspg-3.1.5/src/pgclient.c:340: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).
		locbuf += strlen(name) + 1;
data/pspg-3.1.5/src/pgclient.c:358:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				size += strlen(PQgetvalue(result, i, j)) + 1;
data/pspg-3.1.5/src/pgclient.c:384: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).
			locbuf += strlen(value) + 1;
data/pspg-3.1.5/src/pretty-csv.c:123:26:  [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).
	pb_write(printbuf, str, strlen(str));
data/pspg-3.1.5/src/pretty-csv.c:158: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).
	pb_write_repeat(printbuf, n, str, strlen(str));
data/pspg-3.1.5/src/pretty-csv.c:182:26:  [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).
	pb_write(printbuf, str, strlen(str));
data/pspg-3.1.5/src/pretty-csv.c:517: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).
								width = strlen(field);
data/pspg-3.1.5/src/pretty-csv.c:670: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).
	int		l = strlen(str);
data/pspg-3.1.5/src/pretty-csv.c:812: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).
	size_t		nullstr_size = strlen(nullstr);
data/pspg-3.1.5/src/pretty-csv.c:813:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t		nullstr_width = force8bit ? strlen(nullstr) : (size_t) utf_string_dsplen(nullstr, strlen(nullstr));
data/pspg-3.1.5/src/pretty-csv.c:813:92:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t		nullstr_width = force8bit ? strlen(nullstr) : (size_t) utf_string_dsplen(nullstr, strlen(nullstr));
data/pspg-3.1.5/src/pretty-csv.c:837: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).
						newsize += str ? strlen(str) + 1 : 0;
data/pspg-3.1.5/src/pretty-csv.c:860: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).
							locbuf += strlen(newrow->fields[j]) + 1;
data/pspg-3.1.5/src/pretty-csv.c:901: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).
	endnames = names + strlen(names);
data/pspg-3.1.5/src/pretty-csv.c:918: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).
				size_t		len = strlen(ptr);
data/pspg-3.1.5/src/pretty-csv.c:930: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).
					size_t		len2 = strlen(row->fields[i]);
data/pspg-3.1.5/src/pretty-csv.c:946: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).
			ptr += strlen(ptr) + 1;
data/pspg-3.1.5/src/pretty-csv.c:970:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int		nullstr_size = strlen(opts->nullstr);
data/pspg-3.1.5/src/pretty-csv.c:972:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:987:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1087:7:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1114:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int		nullstr_size = strlen(opts->nullstr);
data/pspg-3.1.5/src/pretty-csv.c:1116:6:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1140:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					int		c2 = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1221:10:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1245:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1338:8:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			c = fgetc(ifile);
data/pspg-3.1.5/src/pretty-csv.c:1468:26:  [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).
			desc->headline_size = strlen(desc->headline);
data/pspg-3.1.5/src/pretty-csv.c:1556: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).
		desc->headline_char_size = strlen(desc->headline_transl);
data/pspg-3.1.5/src/print.c:723:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				free_row = smalloc(left_spaces + strlen(rowstr) + 1);
data/pspg-3.1.5/src/print.c:1255: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).
				free_row = malloc(left_spaces + strlen(rowstr) + 1);
data/pspg-3.1.5/src/pspg.c:265: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).
			endptr = line + strlen(line) - 1;
data/pspg-3.1.5/src/pspg.c:277: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).
			len = opts->force8bit ? strlen(line) : utf8len(line);
data/pspg-3.1.5/src/pspg.c:785: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).
		mvwprintw(top_bar, 0, maxx - strlen(buffer) - 2, "  %s", buffer);
data/pspg-3.1.5/src/pspg.c:917: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).
		timeout = strlen(fmt) < 50 ? 2000 : 6000;
data/pspg-3.1.5/src/pspg.c:990: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).
		cursor_col = strlen(rl_display_prompt) + min_int(strlen(rl_line_buffer), rl_point);
data/pspg-3.1.5/src/pspg.c:990:52:  [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).
		cursor_col = strlen(rl_display_prompt) + min_int(strlen(rl_line_buffer), rl_point);
data/pspg-3.1.5/src/pspg.c:1125:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buffer, readline_buffer, maxsize - 1);
data/pspg-3.1.5/src/pspg.c:1138:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(last_history, buffer, sizeof(last_history) - 1);
data/pspg-3.1.5/src/pspg.c:1382:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
				len = read(current_state->inotify_fd, buff, sizeof(buff));
data/pspg-3.1.5/src/pspg.c:1408:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
					len = read(current_state->inotify_fd, buff, sizeof(buff));
data/pspg-3.1.5/src/pspg.c:1415:5:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
				usleep(1000 * 100);
data/pspg-3.1.5/src/pspg.c:1809:3:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
		usleep(1000 * 1000 * state.boot_wait);
data/pspg-3.1.5/src/pspg.c:1976:40:  [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 (strspn(pagerprog, " \t\r\n") == strlen(pagerprog))
data/pspg-3.1.5/src/pspg.c:4121:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(last_path, buffer, sizeof(last_path) - 1);
data/pspg-3.1.5/src/pspg.c:4189:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(scrdesc.searchterm, locsearchterm, sizeof(scrdesc.searchterm));
data/pspg-3.1.5/src/pspg.c:4191: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).
						scrdesc.searchterm_size = strlen(scrdesc.searchterm);
data/pspg-3.1.5/src/pspg.c:4192:55:  [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).
						scrdesc.searchterm_char_size = opts.force8bit ? strlen(scrdesc.searchterm) : utf8len(scrdesc.searchterm);
data/pspg-3.1.5/src/pspg.c:4329:7:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
						strncpy(scrdesc.searchterm, locsearchterm, sizeof(scrdesc.searchterm));
data/pspg-3.1.5/src/pspg.c:4331: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).
						scrdesc.searchterm_size = strlen(scrdesc.searchterm);
data/pspg-3.1.5/src/pspg.c:4493:8:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
							strncpy(scrdesc.searchcolterm, locsearchterm, sizeof(scrdesc.searchcolterm));
data/pspg-3.1.5/src/pspg.c:4494: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).
							scrdesc.searchcolterm_size = strlen(scrdesc.searchcolterm);
data/pspg-3.1.5/src/st_menu.c:250: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).
		return utf_string_dsplen((const char *) str, strlen(str));
data/pspg-3.1.5/src/st_menu.c:254: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).
	return strlen(str);
data/pspg-3.1.5/src/st_menu.c:294:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(buffer2, str, chrl);
data/pspg-3.1.5/src/st_menu.c:611: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).
				accelerators[naccel].length = strlen(accelerators[naccel].c);
data/pspg-3.1.5/src/st_menu.c:1759: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).
			l_pressed = strlen(pressed);
data/pspg-3.1.5/src/st_menu.c:2331:40:  [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).
			menu->accelerators[naccel].length = strlen(menu->accelerators[naccel].c);
data/pspg-3.1.5/src/st_menu.c:2912:43:  [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).
			cmdbar->labels[fkey - 1] = safe_malloc(strlen(cmdbar_item->text) + 1);
data/pspg-3.1.5/src/st_menu.c:2929:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				last_position += strlen("M-");
data/pspg-3.1.5/src/st_menu.c:2931:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				last_position += strlen("Fx");
data/pspg-3.1.5/src/st_menu.c:2933:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				last_position += strlen("0");
data/pspg-3.1.5/src/table.c:398: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(str);
data/pspg-3.1.5/src/table.c:461:7:  [1] (obsolete) usleep:
  This C routine is considered obsolete (as opposed to the shell command by
  the same name). The interaction of this function with SIGALRM and other
  timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is
  unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead.
						usleep(1000);
data/pspg-3.1.5/src/table.c:541:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t		read;
data/pspg-3.1.5/src/table.c:592:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(desc->filename, name, 64);
data/pspg-3.1.5/src/table.c:642:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		clen = utf_string_dsplen(line, read);
data/pspg-3.1.5/src/table.c:658:45:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			strncpytrim(opts, desc->title, line, 63, read);
data/pspg-3.1.5/src/table.c:725:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	} while (read != -1);
data/pspg-3.1.5/src/table.c:762: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).
		desc->headline_size = strlen(desc->headline);
data/pspg-3.1.5/src/table.c:774: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).
		desc->headline_size = strlen(desc->headline);
data/pspg-3.1.5/src/table.c:1068: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).
		desc->headline_char_size = strlen(desc->headline_transl);
data/pspg-3.1.5/src/table.c:1372: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 (strlen(_nullstr) == len)

ANALYSIS SUMMARY:

Hits = 180
Lines analyzed = 19604 in approximately 0.43 seconds (46036 lines/second)
Physical Source Lines of Code (SLOC) = 14986
Hits@level = [0] 158 [1]  83 [2]  71 [3]   6 [4]  20 [5]   0
Hits@level+ = [0+] 338 [1+] 180 [2+]  97 [3+]  26 [4+]  20 [5+]   0
Hits/KSLOC@level+ = [0+] 22.5544 [1+] 12.0112 [2+] 6.47271 [3+] 1.73495 [4+] 1.33458 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.