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/ristretto-0.10.0/src/properties_dialog.c Examining data/ristretto-0.10.0/src/mime_db.h Examining data/ristretto-0.10.0/src/image_list.h Examining data/ristretto-0.10.0/src/file.c Examining data/ristretto-0.10.0/src/tumbler.h Examining data/ristretto-0.10.0/src/image_viewer.c Examining data/ristretto-0.10.0/src/settings.h Examining data/ristretto-0.10.0/src/gnome_wallpaper_manager.h Examining data/ristretto-0.10.0/src/file.h Examining data/ristretto-0.10.0/src/mime_db.c Examining data/ristretto-0.10.0/src/util.h Examining data/ristretto-0.10.0/src/gnome_wallpaper_manager.c Examining data/ristretto-0.10.0/src/properties_dialog.h Examining data/ristretto-0.10.0/src/image_viewer.h Examining data/ristretto-0.10.0/src/settings.c Examining data/ristretto-0.10.0/src/marshal.h Examining data/ristretto-0.10.0/src/app_menu_item.h Examining data/ristretto-0.10.0/src/privacy_dialog.c Examining data/ristretto-0.10.0/src/tumbler.c Examining data/ristretto-0.10.0/src/monitor_chooser.h Examining data/ristretto-0.10.0/src/image_list.c Examining data/ristretto-0.10.0/src/marshal.c Examining data/ristretto-0.10.0/src/icon_bar.c Examining data/ristretto-0.10.0/src/xfce_wallpaper_manager.h Examining data/ristretto-0.10.0/src/main_window_ui.h Examining data/ristretto-0.10.0/src/util.c Examining data/ristretto-0.10.0/src/preferences_dialog.h Examining data/ristretto-0.10.0/src/monitor_chooser.c Examining data/ristretto-0.10.0/src/wallpaper_manager.c Examining data/ristretto-0.10.0/src/main_window.h Examining data/ristretto-0.10.0/src/thumbnailer.c Examining data/ristretto-0.10.0/src/preferences_dialog.c Examining data/ristretto-0.10.0/src/icon_bar.h Examining data/ristretto-0.10.0/src/privacy_dialog.h Examining data/ristretto-0.10.0/src/thumbnailer.h Examining data/ristretto-0.10.0/src/main.c Examining data/ristretto-0.10.0/src/xfce_wallpaper_manager.c Examining data/ristretto-0.10.0/src/main_window.c Examining data/ristretto-0.10.0/src/wallpaper_manager.h Examining data/ristretto-0.10.0/src/app_menu_item.c FINAL RESULTS: data/ristretto-0.10.0/src/file.c:576:63: [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. r_file->priv->thumbnail_path = g_build_path ("/", g_get_home_dir(), ".thumbnails", "normal", filename, NULL); data/ristretto-0.10.0/src/image_list.c:322:31: [3] (random) g_random_int: 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. image_list->priv->stamp = g_random_int(); data/ristretto-0.10.0/src/properties_dialog.c:346:49: [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. thumbnail_path = g_build_path ("/", g_get_home_dir(), ".thumbnails", "normal", filename, NULL); data/ristretto-0.10.0/src/file.c:565:72: [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). checksum = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, strlen (uri)); data/ristretto-0.10.0/src/main_window.c:3234: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 (g_value_get_string (¤t_uri_val)) > 0) data/ristretto-0.10.0/src/properties_dialog.c:335:86: [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). file_uri_checksum = g_compute_checksum_for_string (G_CHECKSUM_MD5, file_uri, strlen (file_uri)); ANALYSIS SUMMARY: Hits = 6 Lines analyzed = 23355 in approximately 0.43 seconds (54839 lines/second) Physical Source Lines of Code (SLOC) = 17282 Hits@level = [0] 0 [1] 3 [2] 0 [3] 3 [4] 0 [5] 0 Hits@level+ = [0+] 6 [1+] 6 [2+] 3 [3+] 3 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 0.347182 [1+] 0.347182 [2+] 0.173591 [3+] 0.173591 [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.