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/feh-3.5/src/winwidget.h
Examining data/feh-3.5/src/winwidget.c
Examining data/feh-3.5/src/wallpaper.h
Examining data/feh-3.5/src/wallpaper.c
Examining data/feh-3.5/src/utils.h
Examining data/feh-3.5/src/utils.c
Examining data/feh-3.5/src/timers.h
Examining data/feh-3.5/src/timers.c
Examining data/feh-3.5/src/thumbnail.h
Examining data/feh-3.5/src/thumbnail.c
Examining data/feh-3.5/src/strverscmp.c
Examining data/feh-3.5/src/structs.h
Examining data/feh-3.5/src/slideshow.c
Examining data/feh-3.5/src/signals.h
Examining data/feh-3.5/src/signals.c
Examining data/feh-3.5/src/options.h
Examining data/feh-3.5/src/options.c
Examining data/feh-3.5/src/multiwindow.c
Examining data/feh-3.5/src/menu.h
Examining data/feh-3.5/src/menu.c
Examining data/feh-3.5/src/md5.h
Examining data/feh-3.5/src/md5.c
Examining data/feh-3.5/src/main.c
Examining data/feh-3.5/src/list.c
Examining data/feh-3.5/src/keyevents.c
Examining data/feh-3.5/src/index.h
Examining data/feh-3.5/src/index.c
Examining data/feh-3.5/src/imlib.c
Examining data/feh-3.5/src/gib_style.h
Examining data/feh-3.5/src/gib_style.c
Examining data/feh-3.5/src/gib_list.h
Examining data/feh-3.5/src/gib_list.c
Examining data/feh-3.5/src/gib_imlib.h
Examining data/feh-3.5/src/gib_imlib.c
Examining data/feh-3.5/src/gib_hash.h
Examining data/feh-3.5/src/gib_hash.c
Examining data/feh-3.5/src/getopt1.c
Examining data/feh-3.5/src/getopt.h
Examining data/feh-3.5/src/getopt.c
Examining data/feh-3.5/src/filelist.h
Examining data/feh-3.5/src/filelist.c
Examining data/feh-3.5/src/feh_png.h
Examining data/feh-3.5/src/feh_png.c
Examining data/feh-3.5/src/feh.h
Examining data/feh-3.5/src/exif_nikon.h
Examining data/feh-3.5/src/exif_nikon.c
Examining data/feh-3.5/src/exif_cfg.h
Examining data/feh-3.5/src/exif_canon.h
Examining data/feh-3.5/src/exif_canon.c
Examining data/feh-3.5/src/exif.h
Examining data/feh-3.5/src/exif.c
Examining data/feh-3.5/src/events.h
Examining data/feh-3.5/src/events.c
Examining data/feh-3.5/src/debug.h

FINAL RESULTS:

data/feh-3.5/src/debug.h:47:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf a; \
data/feh-3.5/src/debug.h:56:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
		printf a; \
data/feh-3.5/src/imlib.c:438: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("dcraw", "dcraw", "-i", filename, NULL);
data/feh-3.5/src/imlib.c:503: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("dcraw", "dcraw", "-c", "-e", filename, NULL);
data/feh-3.5/src/imlib.c:612: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("convert", "convert", filename, argv_fn, NULL);
data/feh-3.5/src/imlib.c:889: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(errstr, 1024, fmt, args);
data/feh-3.5/src/imlib.c:1120:14:  [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.
	info_pipe = popen(info_cmd, "r");
data/feh-3.5/src/imlib.c:1577: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("jpegtran", "jpegtran", "-copy", "all", op_op, op_value,
data/feh-3.5/src/imlib.c:1605: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("jpegexiforient", "jpegexiforient", "-1", file_str, NULL);
data/feh-3.5/src/imlib.c:1662:11:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			line = strcat(line, opt.action_titles[i]);
data/feh-3.5/src/imlib.c:1696: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(line, index);
data/feh-3.5/src/imlib.c:1698:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(line, opt.action_titles[i]);
data/feh-3.5/src/index.c:342:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, PACKAGE " - File saved as %s\n", output_buf);
data/feh-3.5/src/index.c:481:2:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
	snprintf(str, sizeof(str), PACKAGE " index - %d thumbnails, %d by %d pixels", num, w, h);
data/feh-3.5/src/options.c:187:4:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
			sscanf(s, "%s %[^\n]\n", (char *) &s1, (char *) &s2);
data/feh-3.5/src/slideshow.c:374:3:  [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(sys);
data/feh-3.5/src/thumbnail.c:402:4:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
			fprintf(stderr, PACKAGE " - File saved as %s\n", output_buf);
data/feh-3.5/src/utils.c:39: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/feh-3.5/src/utils.c:57: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/feh-3.5/src/utils.c:76: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(t, s);
data/feh-3.5/src/utils.c:131:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(string, s);
data/feh-3.5/src/utils.c:135:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(string, separator);
data/feh-3.5/src/utils.c:136:4:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
			strcat(string, s);
data/feh-3.5/src/utils.h:58: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(____newstr, (a));\
data/feh-3.5/src/utils.h:59:7:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
      strcat(____newstr, (b));\
data/feh-3.5/src/utils.h:76: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(____newstr, (a));\
data/feh-3.5/src/wallpaper.c:831:3:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
		strcat(message, buff);
data/feh-3.5/src/wallpaper.c:835: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(message, buff);
data/feh-3.5/src/winwidget.c:999: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(winwid->name, newname);
data/feh-3.5/src/events.c:113: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.
	home = getenv("HOME");
data/feh-3.5/src/events.c:114:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	confhome = getenv("XDG_CONFIG_HOME");
data/feh-3.5/src/filelist.c:650:6:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
	if (realpath(temp, fullpath) != NULL) {
data/feh-3.5/src/getopt.c:198:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
char *getenv();
data/feh-3.5/src/getopt.c:378:20:  [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.
	posixly_correct = getenv("POSIXLY_CORRECT");
data/feh-3.5/src/getopt.c:873:5:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
int getopt(argc, argv, optstring)
data/feh-3.5/src/getopt.c:898:7:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
		c = getopt(argc, argv, "abc:d:0123456789");
data/feh-3.5/src/getopt.h:103:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt(int argc, char *const *argv, const char *shortopts);
data/feh-3.5/src/getopt.h:108:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt();
data/feh-3.5/src/getopt.h:111:13:  [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.
	extern int getopt_long(int argc, char *const *argv,
data/feh-3.5/src/getopt.h:120:13:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
	extern int getopt();
data/feh-3.5/src/getopt.h:121:13:  [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.
	extern int getopt_long();
data/feh-3.5/src/getopt1.c:60:5:  [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.
int getopt_long(argc, argv, options, long_options, opt_index)
data/feh-3.5/src/getopt1.c:111:7:  [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.
		c = getopt_long(argc, argv, "abc:d:0123456789", long_options, &option_index);
data/feh-3.5/src/gib_list.c:365:15:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
      r = i + random() / (RAND_MAX / (len - i) + 1 );
data/feh-3.5/src/imlib.c:578:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("MAGICK_TMPDIR") == NULL) {
data/feh-3.5/src/imlib.c:761: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.
			} else if (getenv("CURL_CA_BUNDLE") != NULL) {
data/feh-3.5/src/imlib.c:764:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
						getenv("CURL_CA_BUNDLE"));
data/feh-3.5/src/keyevents.c:215: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.
	home = getenv("HOME");
data/feh-3.5/src/keyevents.c:216:13:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	confhome = getenv("XDG_CONFIG_HOME");
data/feh-3.5/src/keyevents.c:689:38:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
			feh_thumbnail_select_next(winwid, random() % (filelist_len - 1));
data/feh-3.5/src/main.c:49:2:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	srandom(getpid() * time(NULL) % ((unsigned int) -1));
data/feh-3.5/src/options.c:133:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *home = getenv("HOME");
data/feh-3.5/src/options.c:136:19:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	char *confbase = getenv("XDG_CONFIG_HOME");
data/feh-3.5/src/options.c:315:18:  [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 ((optch = getopt_long(argc, argv, stropts, lopts, &cmdx)) != EOF) {
data/feh-3.5/src/options.c:440:18:  [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 ((optch = getopt_long(argc, argv, stropts, lopts, &cmdx)) != EOF) {
data/feh-3.5/src/slideshow.c:238:7:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
					(random() % (filelist_len - 1)) + 1);
data/feh-3.5/src/thumbnail.c:601: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.
	xdg_cache_home = getenv("XDG_CACHE_HOME");
data/feh-3.5/src/thumbnail.c:605:10:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		home = getenv("HOME");
data/feh-3.5/src/wallpaper.c:255:18:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
	int num = (int) random();
data/feh-3.5/src/wallpaper.c:268:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		if (getenv("HOME") == NULL) {
data/feh-3.5/src/wallpaper.c:272:48:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		snprintf(bgfil, sizeof(bgfil), "%s/.%s.png", getenv("HOME"), bgname);
data/feh-3.5/src/wallpaper.c:452:11:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
			home = getenv("HOME");
data/feh-3.5/src/events.c:86:19:  [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).
	button->button = atoi(cur);
data/feh-3.5/src/events.c:99: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 line[128];
data/feh-3.5/src/events.c:100:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char action[32], button[8];
data/feh-3.5/src/events.c:123:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	conf = fopen(confpath, "r");
data/feh-3.5/src/events.c:127:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!conf && ((conf = fopen("/etc/feh/buttons", "r")) == NULL))
data/feh-3.5/src/exif.c:62: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 s[EXIF_MAX_DATA];
data/feh-3.5/src/exif.c:89: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 s[EXIF_MAX_DATA];
data/feh-3.5/src/exif.c:119:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[1024];
data/feh-3.5/src/exif.c:164:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif.c:247:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:40: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 *EXN_NikonFlashControlModeValues[EXN_FLASH_CONTROL_MODES_MAX] = {"Off", 
data/feh-3.5/src/exif_nikon.c:53: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 *EXN_NikonContrastDetectAF[EXN_CONTRAST_DETECT_AF_MAX] = {"Off", "On"};
data/feh-3.5/src/exif_nikon.c:57: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 *EXN_NikonAFAreaModePhase[EXN_AF_AREA_MODE_P_MAX] = {
data/feh-3.5/src/exif_nikon.c:66: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 *EXN_NikonAFAreaModeContr[EXN_AF_AREA_MODE_C_MAX] = {
data/feh-3.5/src/exif_nikon.c:74: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 *EXN_NikonPhaseDetectAF[EXN_PHASE_DETECT_AF_MAX] = {"Off", "On (51-point)", 
data/feh-3.5/src/exif_nikon.c:80: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 * EXN_Prim_AF_Pt_51[EXN_PRIM_AF_PT_51_MAX] = {"(none)", "C6 (Center)", "B6", "A5",
data/feh-3.5/src/exif_nikon.c:87: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 * EXN_Prim_AF_Pt_11[EXN_PRIM_AF_PT_11_MAX] = {"(none)", "Center", "Top", "Bottom",
data/feh-3.5/src/exif_nikon.c:92: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 * EXN_Prim_AF_Pt_39[EXN_PRIM_AF_PT_39_MAX] = {"(none)", "C6 (Center)", "B6", "A2",
data/feh-3.5/src/exif_nikon.c:99: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 * EXN_Pic_Ctrl_Adj[EXN_PIC_CTRL_ADJ_MAX] = {"Default Settings", 
data/feh-3.5/src/exif_nikon.c:207:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:223:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:279:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:280: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 picturecontrolname[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:281: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 picturecontrolbase[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:336:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:379:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/exif_nikon.c:435:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[EXIF_STD_BUF_LEN];
data/feh-3.5/src/feh_png.c:45:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!(fp = fopen(file, "rb")))
data/feh-3.5/src/feh_png.c:198:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char buf[8];
data/feh-3.5/src/filelist.c:161:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[1024];
data/feh-3.5/src/filelist.c:164:11:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	int fd = mkstemp(sfn);
data/feh-3.5/src/filelist.c:425: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 dir1[PATH_MAX], dir2[PATH_MAX];
data/feh-3.5/src/filelist.c:557:12:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if ((fp = fopen(filename, "w")) == NULL) {
data/feh-3.5/src/filelist.c:574: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 s[1024], s1[1024];
data/feh-3.5/src/filelist.c:605:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		fp = fopen(filename, "r");
data/feh-3.5/src/filelist.c:631: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 cwd[PATH_MAX];
data/feh-3.5/src/filelist.c:632: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 fullpath[PATH_MAX];
data/feh-3.5/src/filelist.c:633: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 temp[PATH_MAX];
data/feh-3.5/src/gib_imlib.c:657: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).
         rr = atoi(ll->data);
data/feh-3.5/src/gib_imlib.c:658: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).
         gg = atoi(ll->next->data);
data/feh-3.5/src/gib_imlib.c:659: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).
         bb = atoi(ll->next->next->data);
data/feh-3.5/src/gib_imlib.c:664: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).
         rr = atoi(ll->data);
data/feh-3.5/src/gib_imlib.c:665: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).
         gg = atoi(ll->next->data);
data/feh-3.5/src/gib_imlib.c:666: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).
         bb = atoi(ll->next->next->data);
data/feh-3.5/src/gib_imlib.c:667: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).
         aa = atoi(ll->next->next->next->data);
data/feh-3.5/src/gib_style.c:110: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(*dest, data, sizeof(gib_style_bit));
data/feh-3.5/src/imlib.c:434:18:  [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).
			int devnull = open("/dev/null", O_WRONLY);
data/feh-3.5/src/imlib.c:482:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(sfn);
data/feh-3.5/src/imlib.c:556:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(sfn);
data/feh-3.5/src/imlib.c:594: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).
		devnull = open("/dev/null", O_WRONLY);
data/feh-3.5/src/imlib.c:732:7:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
	fd = mkstemp(sfn);
data/feh-3.5/src/imlib.c:852:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[100];
data/feh-3.5/src/imlib.c:1003: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 info_line[256];
data/feh-3.5/src/imlib.c:1004: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 *info_buf[128];
data/feh-3.5/src/imlib.c:1005: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[EXIF_MAX_DATA];
data/feh-3.5/src/imlib.c:1108: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 info_line[256];
data/feh-3.5/src/imlib.c:1109: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 *info_buf[128];
data/feh-3.5/src/imlib.c:1454: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 delim[2] = { '\n', '\0' };
data/feh-3.5/src/imlib.c:1559: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(op_name,  "flip");
data/feh-3.5/src/imlib.c:1560: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(op_op,    "-flip");
data/feh-3.5/src/imlib.c:1561: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(op_value, "vertical");
data/feh-3.5/src/imlib.c:1563: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(op_name,  "mirror");
data/feh-3.5/src/imlib.c:1564: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(op_op,    "-flip");
data/feh-3.5/src/imlib.c:1602: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).
		devnull = open("/dev/null", O_WRONLY);
data/feh-3.5/src/imlib.c:1633: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 index[3];
data/feh-3.5/src/imlib.c:1661: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(line, "0: ");
data/feh-3.5/src/imlib.c:1695:4:  [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(index, "%d", i);
data/feh-3.5/src/imlib.c:1697:4:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
			strcat(line, ": ");
data/feh-3.5/src/index.c:324: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 output_buf[1024];
data/feh-3.5/src/index.c:479: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 str[50];
data/feh-3.5/src/keyevents.c:131: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 line[128];
data/feh-3.5/src/keyevents.c:132: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 action[32], k1[32], k2[32], k3[32];
data/feh-3.5/src/keyevents.c:225:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	conf = fopen(confpath, "r");
data/feh-3.5/src/keyevents.c:229:24:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!conf && ((conf = fopen("/etc/feh/keys", "r")) == NULL))
data/feh-3.5/src/keyevents.c:319: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 stdin_buf[2];
data/feh-3.5/src/keyevents.c:371: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 kbuf[20];
data/feh-3.5/src/keyevents.c:446:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				fp = fopen(caption_filename, "w");
data/feh-3.5/src/md5.c:52: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 *const test[7] = {
data/feh-3.5/src/md5.c:199: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(xbuf, data, 64);
data/feh-3.5/src/md5.c:348: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(pms->buf + offset, p, copy);
data/feh-3.5/src/md5.c:362: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(pms->buf, p, left);
data/feh-3.5/src/menu.c:935:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[30];
data/feh-3.5/src/menu.c:1378: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[400];
data/feh-3.5/src/options.c:138: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 s[1024], s1[1024], s2[1024];
data/feh-3.5/src/options.c:153:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(rcpath, "r");
data/feh-3.5/src/options.c:157:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!fp && ((fp = fopen(oldrcpath, "r")) != NULL))
data/feh-3.5/src/options.c:165:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!fp && ((fp = fopen("/etc/feh/themes", "r")) == NULL))
data/feh-3.5/src/options.c: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 *list[sizeof(char *) * 64];
data/feh-3.5/src/options.c:271: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 ret[4096];
data/feh-3.5/src/options.c:486:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.thumb_h = atoi(optarg);
data/feh-3.5/src/options.c:495:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.limit_h = atoi(optarg);
data/feh-3.5/src/options.c:502:23:  [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).
			opt.thumb_redraw = atoi(optarg);
data/feh-3.5/src/options.c:574:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.limit_w = atoi(optarg);
data/feh-3.5/src/options.c:590: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).
			opt.alpha_level = 255 - atoi(optarg);
data/feh-3.5/src/options.c:670:18:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.thumb_w = atoi(optarg);
data/feh-3.5/src/options.c:701: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).
				opt.default_zoom = atoi(optarg);
data/feh-3.5/src/options.c:711:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.conversion_timeout = atoi(optarg);
data/feh-3.5/src/options.c:785:22:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.scroll_step = atoi(optarg);
data/feh-3.5/src/options.c:788:25:  [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).
			opt.xinerama_index = atoi(optarg);
data/feh-3.5/src/options.c:797:21:  [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).
			opt.cache_size = atoi(optarg);
data/feh-3.5/src/options.c:816:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			opt.conversion_timeout = atoi(optarg);
data/feh-3.5/src/options.h:82:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	unsigned char hold_actions[10];
data/feh-3.5/src/options.h:98: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 *actions[10];
data/feh-3.5/src/options.h:99: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 *action_titles[10];
data/feh-3.5/src/slideshow.c:272: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 old_dir[PATH_MAX], new_dir[PATH_MAX];
data/feh-3.5/src/slideshow.c:288: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 old_dir[PATH_MAX], new_dir[PATH_MAX];
data/feh-3.5/src/slideshow.c:381: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 ret[5];
data/feh-3.5/src/slideshow.c:395:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[20];
data/feh-3.5/src/slideshow.c:396: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 ret[4096];
data/feh-3.5/src/thumbnail.c:385: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 output_buf[1024];
data/feh-3.5/src/thumbnail.c:672: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(pos, "%02x", digest[i]);
data/feh-3.5/src/thumbnail.c:674: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(pos, ".png");
data/feh-3.5/src/thumbnail.c:685:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char c_width[8], c_height[8];
data/feh-3.5/src/thumbnail.c:707: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 c_mtime[128];
data/feh-3.5/src/thumbnail.c:708:4:  [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(c_mtime, "%d", (int)sb.st_mtime);
data/feh-3.5/src/thumbnail.c:718:13:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
			tmp_fd = mkstemp(tmp_thumb_file);
data/feh-3.5/src/thumbnail.c:757: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).
				*orig_w = atoi(c_width);
data/feh-3.5/src/thumbnail.c:759: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).
				*orig_h = atoi(c_height);
data/feh-3.5/src/timers.c:175: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 evname[20];
data/feh-3.5/src/utils.c:160: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 num[10];
data/feh-3.5/src/utils.c:161: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 cppid[12];
data/feh-3.5/src/utils.c:187: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[4096];
data/feh-3.5/src/utils.c:191:7:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fp = fopen(path, "r");
data/feh-3.5/src/utils.c:208: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 ret[1024];
data/feh-3.5/src/wallpaper.c:254: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 bgname[20];
data/feh-3.5/src/wallpaper.c:256: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 bgfil[4096];
data/feh-3.5/src/wallpaper.c:257: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 sendbuf[4096];
data/feh-3.5/src/wallpaper.c:461:15:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
				if ((fp = fopen(path, "w")) == NULL) {
data/feh-3.5/src/wallpaper.c:630:10:  [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).
	desks = atoi(ptr);
data/feh-3.5/src/wallpaper.c:729: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 buff[21];
data/feh-3.5/src/wallpaper.c:768: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(buff, "%8x", (int) my_ipc_win);
data/feh-3.5/src/wallpaper.c:795: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 msg_buffer[20];
data/feh-3.5/src/wallpaper.c:816: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 buff[13], *ret_msg = NULL;
data/feh-3.5/src/winwidget.c:157:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char hostname[HOST_NAME_MAX];
data/feh-3.5/src/winwidget.c:708: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.
        char dir[PATH_MAX];
data/feh-3.5/src/winwidget.c:731:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[INOTIFY_BUFFER_LEN];
data/feh-3.5/src/winwidget.c:1007:3:  [2] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant string.
		strcat(winwid->name, " [Paused]");
data/feh-3.5/src/events.c:135:10:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		read = sscanf(line, "%31s %7s\n", (char *) &action, (char *) &button);
data/feh-3.5/src/exif.c:170:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "GPS: %s ", buf);
data/feh-3.5/src/exif.c:170:49:  [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).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "GPS: %s ", buf);
data/feh-3.5/src/exif.c:181:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "%s ", buf);
data/feh-3.5/src/exif.c:181:49:  [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).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "%s ", buf);
data/feh-3.5/src/exif.c:192:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), ", %s ", buf);
data/feh-3.5/src/exif.c:192:49:  [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).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), ", %s ", buf);
data/feh-3.5/src/exif.c:203:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "%s ", buf);
data/feh-3.5/src/exif.c:203:49:  [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).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "%s ", buf);
data/feh-3.5/src/exif.c:214:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "(%s)\n", buf);
data/feh-3.5/src/exif.c:214:49:  [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).
    snprintf(buffer + strlen(buffer), maxsize - strlen(buffer), "(%s)\n", buf);
data/feh-3.5/src/exif.c:264:77:  [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).
      exif_get_tag(ed, Exif_tag_list[i].ifd, Exif_tag_list[i].tag, buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:264:103:  [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).
      exif_get_tag(ed, Exif_tag_list[i].ifd, Exif_tag_list[i].tag, buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:287:47:  [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).
                                     buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:287:73:  [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).
                                     buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:299:47:  [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).
                                     buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:299:73:  [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).
                                     buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:312: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).
    exif_get_gps_coords(ed, buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif.c:312:64:  [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).
    exif_get_gps_coords(ed, buffer + strlen(buffer), maxsize - strlen(buffer));
data/feh-3.5/src/exif_nikon.c:297:3:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
  sscanf(buf, "(null): %u bytes unknown data: 303130%02X%40s%40s%*8s%02X%02X%02X%02X%02X%02X%02X",
data/feh-3.5/src/filelist.c:211:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(path);
data/feh-3.5/src/filelist.c:393: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).
	int n = strlen(f->filename) - strlen(f->name);
data/feh-3.5/src/filelist.c:393: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).
	int n = strlen(f->filename) - strlen(f->name);
data/feh-3.5/src/filelist.c:401:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(dst, f->filename, n);
data/feh-3.5/src/getopt.c:220: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).
extern int strlen(const char *);
data/feh-3.5/src/getopt.c:400: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).
				int len = nonoption_flags_max_len = strlen(orig_str);
data/feh-3.5/src/getopt.c:611:63:  [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 ((unsigned int) (nameend - nextchar) == (unsigned int) strlen(p->name)) {
data/feh-3.5/src/getopt.c:629: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).
			nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:659: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).
					nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:673: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).
					nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:678: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).
			nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:773:49:  [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 ((unsigned int) (nameend - nextchar) == strlen(p->name)) {
data/feh-3.5/src/getopt.c:790: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).
				nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:806: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).
						nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:818: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).
						nextchar += strlen(nextchar);
data/feh-3.5/src/getopt.c:822: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).
				nextchar += strlen(nextchar);
data/feh-3.5/src/gib_imlib.c:622: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).
      len = strlen(col);
data/feh-3.5/src/gib_list.c:551: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).
      unsigned int delimiter_len = strlen(delimiter);
data/feh-3.5/src/gib_list.c:561:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
         strncpy(new_string, string, len);
data/feh-3.5/src/imlib.c:359: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(w->name) + sizeof("Reloading: ") + 1;
data/feh-3.5/src/imlib.c:476: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(tmpname) > (NAME_MAX-6))
data/feh-3.5/src/imlib.c:550: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(tmpname) > (NAME_MAX-6))
data/feh-3.5/src/imlib.c:726: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(tmpname) > (NAME_MAX-6))
data/feh-3.5/src/imlib.c:896: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).
	if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':')
data/feh-3.5/src/imlib.c:1129: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).
			if (info_line[strlen(info_line)-1] == '\n')
data/feh-3.5/src/imlib.c:1130:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				info_line[strlen(info_line)-1] = '\0';
data/feh-3.5/src/imlib.c:1477:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			} else if (strlen(p) == 0) {
data/feh-3.5/src/imlib.c:1499: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).
									len = strlen(line)
data/feh-3.5/src/imlib.c:1500: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).
									    + strlen(pp)
data/feh-3.5/src/imlib.c:1550:12:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int len = strlen(filename) + 1;
data/feh-3.5/src/imlib.c:1660: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).
			line = emalloc(strlen(opt.action_titles[i]) + 5);
data/feh-3.5/src/imlib.c:1694: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).
			line = emalloc(strlen(opt.action_titles[i]) + 5);
data/feh-3.5/src/index.c:329:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(output_buf, opt.output_file, 1023);
data/feh-3.5/src/keyevents.c:239:10:  [1] (buffer) sscanf:
  It's unclear if the %s limit in the format string is small enough
  (CWE-120). Check that the limit is sufficiently small, or use a different
  input function.
		read = sscanf(line, "%31s %31s %31s %31s\n",
data/feh-3.5/src/keyevents.c:322:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read(STDIN_FILENO, &stdin_buf, 1) == -1) {
data/feh-3.5/src/md5.c:70: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).
		md5_append(&state, (const md5_byte_t *) test[i], strlen(test[i]));
data/feh-3.5/src/options.c:197: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).
			bspos = strlen(s2)-1;
data/feh-3.5/src/options.c:856:63:  [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 (opt.start_list_at && path_is_url(opt.start_list_at) && (strlen(opt.start_list_at) <= 8 || strncmp(opt.start_list_at, "file:///", 8) != 0)) {
data/feh-3.5/src/options.c:859: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).
			if (strlen(opt.start_list_at) > 8 && strncmp(opt.start_list_at, "file:///", 8) == 0) {
data/feh-3.5/src/slideshow.c:409:8:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
				   strncat(ret, "paused", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:409: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).
				   strncat(ret, "paused", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:412:8:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
				   strncat(ret, "playing", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:412:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				   strncat(ret, "playing", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:417:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, file->filename, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:417:49:  [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).
					strncat(ret, file->filename, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:421:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, shell_escape(file->filename), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:421:63:  [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).
					strncat(ret, shell_escape(file->filename), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:426:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:426: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:432:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:432: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:437:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:437: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).
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:441:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, filelist_tmppath, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:441:51:  [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).
					strncat(ret, filelist_tmppath, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:445:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, filelist_tmppath, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:445:51:  [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).
					strncat(ret, filelist_tmppath, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:449:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, mode, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:449: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).
				strncat(ret, mode, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:453:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, file->name, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:453: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).
					strncat(ret, file->name, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:457:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, shell_escape(file->name), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:457:59:  [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).
					strncat(ret, shell_escape(file->name), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:463:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:463: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:469:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:469: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:474:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, format_size(file->info->pixels), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:474:66:  [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).
					strncat(ret, format_size(file->info->pixels), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:480:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:480: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:486:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:486: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:491:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, format_size(file->info->size), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:491:64:  [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).
					strncat(ret, format_size(file->info->size), sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:496:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, file->info->format, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:496:53:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					strncat(ret, file->info->format, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:502:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:502: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).
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:505:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, VERSION, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:505: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).
				strncat(ret, VERSION, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:509:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:509: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).
				strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:514:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:514: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:520:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:520: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:522:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
					strncat(ret, "1.00", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:522: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).
					strncat(ret, "1.00", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:528:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:528: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).
					strncat(ret, buf, sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:532:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant character.
				strncat(ret, "%", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:532: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).
				strncat(ret, "%", sizeof(ret) - strlen(ret) - 1);
data/feh-3.5/src/slideshow.c:536: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).
				if ((strlen(ret) + 3) < sizeof(ret))
data/feh-3.5/src/slideshow.c:537:6:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
					strncat(ret, c - 1, 2);
data/feh-3.5/src/slideshow.c:540: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).
		} else if ((*c == '\\') && (*(c+1) != '\0') && ((strlen(ret) + 3) < sizeof(ret))) {
data/feh-3.5/src/slideshow.c:544:5:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
				strcat(ret, "\n");
data/feh-3.5/src/slideshow.c:547:5:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
				strncat(ret, c - 1, 2);
data/feh-3.5/src/slideshow.c:550:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		} else if ((strlen(ret) + 2) < sizeof(ret))
data/feh-3.5/src/slideshow.c:551:4:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
			strncat(ret, c, 1);
data/feh-3.5/src/thumbnail.c:390:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(output_buf, opt.output_file, 1023);
data/feh-3.5/src/thumbnail.c:666: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).
	md5_append(&pms, (unsigned char *)uri, strlen(uri));
data/feh-3.5/src/utils.c:42: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).
	if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':')
data/feh-3.5/src/utils.c:60: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).
	if (fmt[0] != '\0' && fmt[strlen(fmt) - 1] == ':')
data/feh-3.5/src/utils.c:73: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).
	t = (char *) malloc(strlen(s) + 1);
data/feh-3.5/src/utils.c:112: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).
	separator_len = strlen(separator);
data/feh-3.5/src/utils.c:117:9:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len = strlen(s);
data/feh-3.5/src/utils.c:121:27:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			len += separator_len + strlen(s);
data/feh-3.5/src/utils.h:57: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).
      ____newstr = emalloc(strlen(a) + strlen(b) + 1);\
data/feh-3.5/src/utils.h:57: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).
      ____newstr = emalloc(strlen(a) + strlen(b) + 1);\
data/feh-3.5/src/utils.h:74: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).
      ____len = strlen((a));\
data/feh-3.5/src/utils.h:88: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).
      ____len = strlen(string);\
data/feh-3.5/src/utils.h:90: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).
        (string)[strlen(string) - chars] = '\0';\
data/feh-3.5/src/wallpaper.c:753: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(str);
data/feh-3.5/src/wallpaper.c:827: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).
	blen = strlen(buff);
data/feh-3.5/src/winwidget.c:290:49:  [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).
				PropModeReplace, (unsigned char *)hostname, strlen(hostname));
data/feh-3.5/src/winwidget.c:298:51:  [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).
						PropModeReplace, (unsigned char *)hostname, strlen(hostname));
data/feh-3.5/src/winwidget.c:356: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).
			PropModeReplace, (const unsigned char *)name, strlen(name));
data/feh-3.5/src/winwidget.c:359: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).
			PropModeReplace, (const unsigned char *)name, strlen(name));
data/feh-3.5/src/winwidget.c:733:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int len = read (opt.inotify_fd, buf, INOTIFY_BUFFER_LEN);
data/feh-3.5/src/winwidget.c:998: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).
	winwid->name = emalloc(strlen(newname) + 10);
data/feh-3.5/src/winwidget.c:1001: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(winwid->name) > 9)
data/feh-3.5/src/winwidget.c:1002: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).
		p_str = winwid->name + strlen(winwid->name) - 9;

ANALYSIS SUMMARY:

Hits = 342
Lines analyzed = 18048 in approximately 0.55 seconds (32979 lines/second)
Physical Source Lines of Code (SLOC) = 13334
Hits@level = [0] 148 [1] 143 [2] 137 [3]  33 [4]  29 [5]   0
Hits@level+ = [0+] 490 [1+] 342 [2+] 199 [3+]  62 [4+]  29 [5+]   0
Hits/KSLOC@level+ = [0+] 36.7482 [1+] 25.6487 [2+] 14.9243 [3+] 4.64977 [4+] 2.17489 [5+]   0
Dot directories skipped = 2 (--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.