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/ukui-menus-1.1.4/libmenu/menu-util.h Examining data/ukui-menus-1.1.4/libmenu/ukuimenu-tree.h Examining data/ukui-menus-1.1.4/libmenu/menu-monitor.c Examining data/ukui-menus-1.1.4/libmenu/menu-layout.h Examining data/ukui-menus-1.1.4/libmenu/menu-monitor.h Examining data/ukui-menus-1.1.4/libmenu/menu-util.c Examining data/ukui-menus-1.1.4/libmenu/menu-layout.c Examining data/ukui-menus-1.1.4/libmenu/desktop-entries.c Examining data/ukui-menus-1.1.4/libmenu/entry-directories.h Examining data/ukui-menus-1.1.4/libmenu/entry-directories.c Examining data/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c Examining data/ukui-menus-1.1.4/libmenu/desktop-entries.h Examining data/ukui-menus-1.1.4/util/test-menu-spec.c Examining data/ukui-menus-1.1.4/python/ukuimenu.c FINAL RESULTS: data/ukui-menus-1.1.4/libmenu/entry-directories.c:614: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/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:445:29: [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_path = freeme = realpath (absolute, NULL); data/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:487: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/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:562: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(tree->absolute_path, NULL); data/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:1720: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/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:1815: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/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:1889: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/ukui-menus-1.1.4/libmenu/menu-layout.c:2310: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")); data/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:2283: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/ukui-menus-1.1.4/libmenu/ukuimenu-tree.c:2286: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; ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 12413 in approximately 0.81 seconds (15311 lines/second) Physical Source Lines of Code (SLOC) = 9412 Hits@level = [0] 0 [1] 3 [2] 0 [3] 7 [4] 0 [5] 0 Hits@level+ = [0+] 10 [1+] 10 [2+] 7 [3+] 7 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.06247 [1+] 1.06247 [2+] 0.743731 [3+] 0.743731 [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.