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/gnome-font-viewer-3.34.0/src/font-model.h
Examining data/gnome-font-viewer-3.34.0/src/font-thumbnailer.c
Examining data/gnome-font-viewer-3.34.0/src/font-view.c
Examining data/gnome-font-viewer-3.34.0/src/open-type-layout.h
Examining data/gnome-font-viewer-3.34.0/src/sushi-font-widget.h
Examining data/gnome-font-viewer-3.34.0/src/totem-resources.c
Examining data/gnome-font-viewer-3.34.0/src/totem-resources.h
Examining data/gnome-font-viewer-3.34.0/src/font-model.c
Examining data/gnome-font-viewer-3.34.0/src/font-utils.c
Examining data/gnome-font-viewer-3.34.0/src/font-utils.h
Examining data/gnome-font-viewer-3.34.0/src/sushi-font-loader.c
Examining data/gnome-font-viewer-3.34.0/src/sushi-font-loader.h
Examining data/gnome-font-viewer-3.34.0/src/sushi-font-widget.c

FINAL RESULTS:

data/gnome-font-viewer-3.34.0/src/font-view.c:958:40:  [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.
    home_prefix = g_file_new_for_path (g_get_home_dir ());
data/gnome-font-viewer-3.34.0/src/sushi-font-widget.c:297:12:  [3] (random) g_random_int_range:
  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_range (0, total_chars);
data/gnome-font-viewer-3.34.0/src/font-view.c:277: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).
                                                strlen (thumb_uri));
data/gnome-font-viewer-3.34.0/src/font-view.c:411:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen (str) == 0 &&
data/gnome-font-viewer-3.34.0/src/font-view.c:412:42:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            ((split[idx + 1] == NULL) || strlen (split[idx + 1]) == 0))
data/gnome-font-viewer-3.34.0/src/font-view.c:435: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).
    ptr += strlen (MATCH_VERSION_STR);
data/gnome-font-viewer-3.34.0/src/sushi-font-widget.c:116: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).
                                       text, 0, strlen (text),

ANALYSIS SUMMARY:

Hits = 7
Lines analyzed = 3849 in approximately 0.17 seconds (23141 lines/second)
Physical Source Lines of Code (SLOC) = 2826
Hits@level = [0]   0 [1]   5 [2]   0 [3]   2 [4]   0 [5]   0
Hits@level+ = [0+]   7 [1+]   7 [2+]   2 [3+]   2 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 2.477 [1+] 2.477 [2+] 0.707714 [3+] 0.707714 [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.