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/mate-menus-1.24.1/libmenu/desktop-entries.c Examining data/mate-menus-1.24.1/libmenu/desktop-entries.h Examining data/mate-menus-1.24.1/libmenu/entry-directories.c Examining data/mate-menus-1.24.1/libmenu/entry-directories.h Examining data/mate-menus-1.24.1/libmenu/matemenu-tree.c Examining data/mate-menus-1.24.1/libmenu/matemenu-tree.h Examining data/mate-menus-1.24.1/libmenu/menu-layout.c Examining data/mate-menus-1.24.1/libmenu/menu-layout.h Examining data/mate-menus-1.24.1/libmenu/menu-monitor.c Examining data/mate-menus-1.24.1/libmenu/menu-monitor.h Examining data/mate-menus-1.24.1/libmenu/menu-util.c Examining data/mate-menus-1.24.1/libmenu/menu-util.h Examining data/mate-menus-1.24.1/util/test-menu-spec.c FINAL RESULTS: data/mate-menus-1.24.1/libmenu/entry-directories.c:734: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/mate-menus-1.24.1/libmenu/matemenu-tree.c:336: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/mate-menus-1.24.1/libmenu/matemenu-tree.c:1890: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/mate-menus-1.24.1/libmenu/matemenu-tree.c:1985: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/mate-menus-1.24.1/libmenu/matemenu-tree.c:2059:22: [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/mate-menus-1.24.1/libmenu/matemenu-tree.c:2483:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). legacy_dir_len = strlen (legacy_dir); data/mate-menus-1.24.1/libmenu/matemenu-tree.c:2486:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). relative_path_len = relative_path ? strlen (relative_path) : 0; data/mate-menus-1.24.1/libmenu/menu-layout.c:2344: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 = 8 Lines analyzed = 11155 in approximately 0.22 seconds (49716 lines/second) Physical Source Lines of Code (SLOC) = 8238 Hits@level = [0] 0 [1] 3 [2] 0 [3] 5 [4] 0 [5] 0 Hits@level+ = [0+] 8 [1+] 8 [2+] 5 [3+] 5 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 0.971109 [1+] 0.971109 [2+] 0.606943 [3+] 0.606943 [4+] 0 [5+] 0 Dot directories skipped = 3 (--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.