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/light-locker-1.8.0/src/ll-config.h Examining data/light-locker-1.8.0/src/gs-grab-x11.c Examining data/light-locker-1.8.0/src/gs-listener-x11.h Examining data/light-locker-1.8.0/src/gs-debug.h Examining data/light-locker-1.8.0/src/gs-content.h Examining data/light-locker-1.8.0/src/preview.c Examining data/light-locker-1.8.0/src/gs-bus.h Examining data/light-locker-1.8.0/src/gs-manager.c Examining data/light-locker-1.8.0/src/light-locker.c Examining data/light-locker-1.8.0/src/gs-listener-x11.c Examining data/light-locker-1.8.0/src/gs-marshal.c Examining data/light-locker-1.8.0/src/gs-monitor.h Examining data/light-locker-1.8.0/src/light-locker.h Examining data/light-locker-1.8.0/src/light-locker-command.c Examining data/light-locker-1.8.0/src/gs-window-x11.c Examining data/light-locker-1.8.0/src/gs-grab.h Examining data/light-locker-1.8.0/src/gs-monitor.c Examining data/light-locker-1.8.0/src/gs-content.c Examining data/light-locker-1.8.0/src/gs-manager.h Examining data/light-locker-1.8.0/src/gs-debug.c Examining data/light-locker-1.8.0/src/gs-window.h Examining data/light-locker-1.8.0/src/gs-marshal.h Examining data/light-locker-1.8.0/src/gs-listener-dbus.h Examining data/light-locker-1.8.0/src/ll-config.c Examining data/light-locker-1.8.0/src/gs-listener-dbus.c FINAL RESULTS: data/light-locker-1.8.0/src/gs-listener-dbus.c:2297:41: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. listener->priv->have_systemd = (access("/run/systemd/seats/", F_OK) >= 0); data/light-locker-1.8.0/src/gs-bus.h:53:41: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They 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. #define DM_SESSION_PATH getenv("XDG_SESSION_PATH") data/light-locker-1.8.0/src/gs-listener-dbus.c:2204:58: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They 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. listener->priv->sd_session_id = g_strdup(getenv("XDG_SESSION_ID")); data/light-locker-1.8.0/src/gs-debug.c:51:9: [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 buffer [1025]; data/light-locker-1.8.0/src/gs-debug.c:96:23: [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. const char path [50] = "light_locker_debug_XXXXXX"; data/light-locker-1.8.0/src/gs-grab-x11.c:74:32: [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. static char foo [255]; data/light-locker-1.8.0/src/gs-grab-x11.c:75:25: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf (foo, "unknown status: %d", status); data/light-locker-1.8.0/src/gs-listener-dbus.c:599:9: [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 [512]; ANALYSIS SUMMARY: Hits = 8 Lines analyzed = 8210 in approximately 0.18 seconds (46457 lines/second) Physical Source Lines of Code (SLOC) = 6060 Hits@level = [0] 2 [1] 0 [2] 5 [3] 2 [4] 1 [5] 0 Hits@level+ = [0+] 10 [1+] 8 [2+] 8 [3+] 3 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 1.65017 [1+] 1.32013 [2+] 1.32013 [3+] 0.49505 [4+] 0.165017 [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.