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-menus-3.36.0/util/test-menu-spec.c
Examining data/gnome-menus-3.36.0/libmenu/menu-util.c
Examining data/gnome-menus-3.36.0/libmenu/menu-monitor.h
Examining data/gnome-menus-3.36.0/libmenu/menu-monitor.c
Examining data/gnome-menus-3.36.0/libmenu/desktop-entries.h
Examining data/gnome-menus-3.36.0/libmenu/menu-layout.c
Examining data/gnome-menus-3.36.0/libmenu/entry-directories.h
Examining data/gnome-menus-3.36.0/libmenu/menu-layout.h
Examining data/gnome-menus-3.36.0/libmenu/menu-util.h
Examining data/gnome-menus-3.36.0/libmenu/gmenu-tree.h
Examining data/gnome-menus-3.36.0/libmenu/entry-directories.c
Examining data/gnome-menus-3.36.0/libmenu/gmenu-tree.c
Examining data/gnome-menus-3.36.0/libmenu/desktop-entries.c

FINAL RESULTS:

data/gnome-menus-3.36.0/libmenu/entry-directories.c:769:15:  [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.
  canonical = realpath (path, NULL);
data/gnome-menus-3.36.0/libmenu/gmenu-tree.c:333:26:  [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.
  tree->canonical_path = realpath (path, NULL);
data/gnome-menus-3.36.0/libmenu/gmenu-tree.c:1904:28:  [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.
      canonical = freeme = realpath (filename, NULL);
data/gnome-menus-3.36.0/libmenu/gmenu-tree.c:1999:25:  [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.
  canonical_menus_dir = realpath (dirname, NULL);
data/gnome-menus-3.36.0/libmenu/gmenu-tree.c:2076:23:  [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.
  canonical_basedir = realpath (basedir, NULL);
data/gnome-menus-3.36.0/libmenu/menu-layout.c:2308: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).
    g_string_truncate (str, str->len - strlen (".menu"));

ANALYSIS SUMMARY:

Hits = 6
Lines analyzed = 11040 in approximately 0.32 seconds (34667 lines/second)
Physical Source Lines of Code (SLOC) = 8237
Hits@level = [0]   0 [1]   1 [2]   0 [3]   5 [4]   0 [5]   0
Hits@level+ = [0+]   6 [1+]   6 [2+]   5 [3+]   5 [4+]   0 [5+]   0
Hits/KSLOC@level+ = [0+] 0.728421 [1+] 0.728421 [2+] 0.607017 [3+] 0.607017 [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.