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/gbonds-2.0.3/src/marshal.h
Examining data/gbonds-2.0.3/src/doc-xml.h
Examining data/gbonds-2.0.3/src/types.c
Examining data/gbonds-2.0.3/src/table.c
Examining data/gbonds-2.0.3/src/debug.c
Examining data/gbonds-2.0.3/src/table-model.h
Examining data/gbonds-2.0.3/src/debug.h
Examining data/gbonds-2.0.3/src/sbw4.h
Examining data/gbonds-2.0.3/src/marshal.c
Examining data/gbonds-2.0.3/src/util.h
Examining data/gbonds-2.0.3/src/table.h
Examining data/gbonds-2.0.3/src/doc-sbw.h
Examining data/gbonds-2.0.3/src/doc.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view-bonobo.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-util.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-item.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view-gtk.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-model.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view.c
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view-bonobo.c
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view-gtk.c
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-item.c
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-view.h
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-util.c
Examining data/gbonds-2.0.3/src/recent-files/egg-recent-model.c
Examining data/gbonds-2.0.3/src/types.h
Examining data/gbonds-2.0.3/src/splash.h
Examining data/gbonds-2.0.3/src/update.h
Examining data/gbonds-2.0.3/src/rules.c
Examining data/gbonds-2.0.3/src/rules.h
Examining data/gbonds-2.0.3/src/gbonds.c
Examining data/gbonds-2.0.3/src/splash.c
Examining data/gbonds-2.0.3/src/window.h
Examining data/gbonds-2.0.3/src/file.h
Examining data/gbonds-2.0.3/src/recent.c
Examining data/gbonds-2.0.3/src/recent.h
Examining data/gbonds-2.0.3/src/window.c
Examining data/gbonds-2.0.3/src/ui.h
Examining data/gbonds-2.0.3/src/view.h
Examining data/gbonds-2.0.3/src/commands.h
Examining data/gbonds-2.0.3/src/commands.c
Examining data/gbonds-2.0.3/src/edit.h
Examining data/gbonds-2.0.3/src/print-dialog.h
Examining data/gbonds-2.0.3/src/prefs-dialog.h
Examining data/gbonds-2.0.3/src/file.c
Examining data/gbonds-2.0.3/src/hig.h
Examining data/gbonds-2.0.3/src/prefs-dialog.c
Examining data/gbonds-2.0.3/src/view.c
Examining data/gbonds-2.0.3/src/edit.c
Examining data/gbonds-2.0.3/src/doc-sbw.c
Examining data/gbonds-2.0.3/src/doc-xml.c
Examining data/gbonds-2.0.3/src/doc.c
Examining data/gbonds-2.0.3/src/table-model.c
Examining data/gbonds-2.0.3/src/update.c
Examining data/gbonds-2.0.3/src/util.c
Examining data/gbonds-2.0.3/src/hig.c
Examining data/gbonds-2.0.3/src/print-dialog.c
Examining data/gbonds-2.0.3/src/print.c
Examining data/gbonds-2.0.3/src/print.h
Examining data/gbonds-2.0.3/src/ui.c
Examining data/gbonds-2.0.3/src/prefs.c
Examining data/gbonds-2.0.3/src/prefs.h

FINAL RESULTS:

data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:1158:11:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
					     g_get_home_dir ());
data/gbonds-2.0.3/src/recent-files/egg-recent-util.c:154:9:  [3] (random) g_random_int:
  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.
	rand = g_random_int ();
data/gbonds-2.0.3/src/table-model.c:252:48:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	gchar *dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (),
data/gbonds-2.0.3/src/util.c:101:48:  [3] (buffer) g_get_home_dir:
  This function is synonymous with 'getenv("HOME")';it returns untrustable
  input if the environment can beset by an attacker. It 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.
	gchar *dir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (),
data/gbonds-2.0.3/src/doc-sbw.c:68: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( filename, "r" );
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:284: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[EGG_RECENT_MODEL_BUFFER_SIZE];
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:436:17:  [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).
							 (time_t)atoi (text));
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:864: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).
	file = fopen (model->priv->path, "r+");
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:869: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).
		file = fopen (model->priv->path, "w+");
data/gbonds-2.0.3/src/recent-files/egg-recent-util.c:146: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[EGG_RECENT_UTIL_HOSTNAME_SIZE];
data/gbonds-2.0.3/src/table-model.c:325: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( fname, "r" );
data/gbonds-2.0.3/src/prefs-dialog.c:383:14:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	        if (strlen (gb_prefs->startup_file))
data/gbonds-2.0.3/src/recent-files/egg-recent-item.c:251:20:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	remaining_bytes = strlen (name);
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:183: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 (content);
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:401: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).
			    strlen (info->current_item->uri) == 0)
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:724: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 (content) <= 0) {
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:734: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).
	if (!g_markup_parse_context_parse (ctx, content, strlen (content),
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:786:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						    strlen (uri));
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:825: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).
			escaped_group = g_markup_escape_text (group, strlen(group));
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:867:3:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
		umask (077);
data/gbonds-2.0.3/src/recent-files/egg-recent-model.c:1250:39:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (strncmp (uri, "recent-files://", strlen ("recent-files://")) == 0) {
data/gbonds-2.0.3/src/recent-files/egg-recent-util.c:28: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).
    	length = strlen (text);
data/gbonds-2.0.3/src/recent-files/egg-recent-view-bonobo.c:196: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).
							 strlen (base_uri));
data/gbonds-2.0.3/src/recent-files/egg-recent-view-bonobo.c:206: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).
			tmp_tip = g_markup_escape_text (tip, strlen (tip));
data/gbonds-2.0.3/src/table-model.c:384:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	n_char = strlen( line ) - 1;
data/gbonds-2.0.3/src/view.c:810: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(rdate)) {
data/gbonds-2.0.3/src/view.c:1244: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).
		g_byte_array_append( array, (guint8 *)string, strlen(string) );

ANALYSIS SUMMARY:

Hits = 27
Lines analyzed = 17468 in approximately 0.42 seconds (41587 lines/second)
Physical Source Lines of Code (SLOC) = 11304
Hits@level = [0]  21 [1]  16 [2]   7 [3]   4 [4]   0 [5]   0
Hits@level+ = [0+]  48 [1+]  27 [2+]  11 [3+]   4 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 4.24628 [1+] 2.38854 [2+] 0.973107 [3+] 0.353857 [4+]   0 [5+]   0
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.