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/totem-3.38.0/src/backend/bacon-time-label.c Examining data/totem-3.38.0/src/backend/bacon-time-label.h Examining data/totem-3.38.0/src/backend/bacon-video-controls-actor.c Examining data/totem-3.38.0/src/backend/bacon-video-controls-actor.h Examining data/totem-3.38.0/src/backend/bacon-video-spinner-actor.c Examining data/totem-3.38.0/src/backend/bacon-video-spinner-actor.h Examining data/totem-3.38.0/src/backend/bacon-video-widget-gst-missing-plugins.c Examining data/totem-3.38.0/src/backend/bacon-video-widget-gst-missing-plugins.h Examining data/totem-3.38.0/src/backend/bacon-video-widget.c Examining data/totem-3.38.0/src/backend/bacon-video-widget.h Examining data/totem-3.38.0/src/backend/bvw-test.c Examining data/totem-3.38.0/src/backend/clock.c Examining data/totem-3.38.0/src/backend/clock.h Examining data/totem-3.38.0/src/backend/totem-aspect-frame.c Examining data/totem-3.38.0/src/backend/totem-aspect-frame.h Examining data/totem-3.38.0/src/gst/totem-gst-helpers.c Examining data/totem-3.38.0/src/gst/totem-gst-helpers.h Examining data/totem-3.38.0/src/gst/totem-gst-pixbuf-helpers.c Examining data/totem-3.38.0/src/gst/totem-gst-pixbuf-helpers.h Examining data/totem-3.38.0/src/gst/totem-time-helpers.c Examining data/totem-3.38.0/src/gst/totem-time-helpers.h Examining data/totem-3.38.0/src/icon-helpers.c Examining data/totem-3.38.0/src/icon-helpers.h Examining data/totem-3.38.0/src/plugins/apple-trailers/totem-apple-trailers.c Examining data/totem-3.38.0/src/plugins/autoload-subtitles/totem-autoload-subtitles.c Examining data/totem-3.38.0/src/plugins/im-status/totem-im-status.c Examining data/totem-3.38.0/src/plugins/media-player-keys/totem-media-player-keys.c Examining data/totem-3.38.0/src/plugins/open-directory/totem-open-directory.c Examining data/totem-3.38.0/src/plugins/properties/bacon-video-widget-properties.c Examining data/totem-3.38.0/src/plugins/properties/bacon-video-widget-properties.h Examining data/totem-3.38.0/src/plugins/properties/totem-movie-properties.c Examining data/totem-3.38.0/src/plugins/recent/totem-recent.c Examining data/totem-3.38.0/src/plugins/rotation/totem-rotation.c Examining data/totem-3.38.0/src/plugins/save-file/totem-save-file.c Examining data/totem-3.38.0/src/plugins/screensaver/totem-screensaver.c Examining data/totem-3.38.0/src/plugins/screenshot/screenshot-filename-builder.c Examining data/totem-3.38.0/src/plugins/screenshot/screenshot-filename-builder.h Examining data/totem-3.38.0/src/plugins/screenshot/totem-gallery-progress.c Examining data/totem-3.38.0/src/plugins/screenshot/totem-gallery-progress.h Examining data/totem-3.38.0/src/plugins/screenshot/totem-gallery.c Examining data/totem-3.38.0/src/plugins/screenshot/totem-gallery.h Examining data/totem-3.38.0/src/plugins/screenshot/totem-screenshot-plugin.c Examining data/totem-3.38.0/src/plugins/screenshot/totem-screenshot-plugin.h Examining data/totem-3.38.0/src/plugins/skipto/totem-skipto-plugin.c Examining data/totem-3.38.0/src/plugins/skipto/totem-skipto.c Examining data/totem-3.38.0/src/plugins/skipto/totem-skipto.h Examining data/totem-3.38.0/src/plugins/skipto/totem-time-entry.c Examining data/totem-3.38.0/src/plugins/skipto/totem-time-entry.h Examining data/totem-3.38.0/src/plugins/totem-dirs.c Examining data/totem-3.38.0/src/plugins/totem-dirs.h Examining data/totem-3.38.0/src/plugins/totem-plugin.h Examining data/totem-3.38.0/src/plugins/totem-plugins-engine.c Examining data/totem-3.38.0/src/plugins/totem-plugins-engine.h Examining data/totem-3.38.0/src/plugins/variable-rate/totem-variable-rate-plugin.c Examining data/totem-3.38.0/src/plugins/vimeo/totem-vimeo.c Examining data/totem-3.38.0/src/test-icons.c Examining data/totem-3.38.0/src/test-totem.c Examining data/totem-3.38.0/src/totem-gallery-thumbnailer.c Examining data/totem-3.38.0/src/totem-grilo.c Examining data/totem-3.38.0/src/totem-grilo.h Examining data/totem-3.38.0/src/totem-interface.c Examining data/totem-3.38.0/src/totem-interface.h Examining data/totem-3.38.0/src/totem-main-toolbar.c Examining data/totem-3.38.0/src/totem-main-toolbar.h Examining data/totem-3.38.0/src/totem-menu.h Examining data/totem-3.38.0/src/totem-object.c Examining data/totem-3.38.0/src/totem-open-location.c Examining data/totem-3.38.0/src/totem-open-location.h Examining data/totem-3.38.0/src/totem-options.c Examining data/totem-3.38.0/src/totem-options.h Examining data/totem-3.38.0/src/totem-playlist.c Examining data/totem-3.38.0/src/totem-playlist.h Examining data/totem-3.38.0/src/totem-preferences.c Examining data/totem-3.38.0/src/totem-preferences.h Examining data/totem-3.38.0/src/totem-private.h Examining data/totem-3.38.0/src/totem-profile.h Examining data/totem-3.38.0/src/totem-resources.c Examining data/totem-3.38.0/src/totem-resources.h Examining data/totem-3.38.0/src/totem-search-entry.c Examining data/totem-3.38.0/src/totem-search-entry.h Examining data/totem-3.38.0/src/totem-selection-toolbar.c Examining data/totem-3.38.0/src/totem-selection-toolbar.h Examining data/totem-3.38.0/src/totem-session.c Examining data/totem-3.38.0/src/totem-session.h Examining data/totem-3.38.0/src/totem-subtitle-encoding.c Examining data/totem-3.38.0/src/totem-subtitle-encoding.h Examining data/totem-3.38.0/src/totem-uri.c Examining data/totem-3.38.0/src/totem-uri.h Examining data/totem-3.38.0/src/totem-video-thumbnailer.c Examining data/totem-3.38.0/src/totem.c Examining data/totem-3.38.0/src/totem.h Examining data/totem-3.38.0/src/totem-menu.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-entry-focus-hack.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-entry-focus-hack.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-icon-utils.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-icon-utils.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-child.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-child.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-generic.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-generic.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-item.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box-item.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-box.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box-child.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box-child.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box-icon.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box-icon.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-box.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-view.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-icon-view.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-list-view.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-list-view.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view-generic.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view-generic.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-margin-container.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-margin-container.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-notification.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-notification.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-styled-text-renderer.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-styled-text-renderer.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-tagged-entry.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-tagged-entry.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-toggle-pixbuf-renderer.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-toggle-pixbuf-renderer.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-two-lines-renderer.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-two-lines-renderer.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-types-catalog.c Examining data/totem-3.38.0/subprojects/libgd/libgd/gd-types-catalog.h Examining data/totem-3.38.0/subprojects/libgd/libgd/gd.h Examining data/totem-3.38.0/subprojects/libgd/test-tagged-entry.c FINAL RESULTS: data/totem-3.38.0/src/plugins/skipto/totem-time-entry.c:57:9: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. args = sscanf (time_string, C_("long time format", "%d:%02d:%02d"), &hour, &min, &sec); data/totem-3.38.0/src/plugins/save-file/totem-save-file.c:144:16: [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. videos_dir = g_get_home_dir (); data/totem-3.38.0/src/plugins/save-file/totem-save-file.c:322:31: [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. if (g_str_has_prefix (path, g_get_home_dir ()) && data/totem-3.38.0/src/plugins/screenshot/screenshot-filename-builder.c:57:30: [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. return g_build_filename (g_get_home_dir (), &path[1], NULL); data/totem-3.38.0/src/plugins/screenshot/screenshot-filename-builder.c:81:20: [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. return g_strdup (g_get_home_dir ()); data/totem-3.38.0/src/plugins/screenshot/totem-screenshot-plugin.c:436:21: [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. path = g_strdup (g_get_home_dir ()); data/totem-3.38.0/src/totem-grilo.c:2007:6: [3] (random) random: 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. int random; data/totem-3.38.0/src/totem-grilo.c:2017:9: [3] (random) random: 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. if (a->random < b->random) data/totem-3.38.0/src/totem-grilo.c:2017:21: [3] (random) random: 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. if (a->random < b->random) data/totem-3.38.0/src/totem-grilo.c:2019:14: [3] (random) random: 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. else if (a->random > b->random) data/totem-3.38.0/src/totem-grilo.c:2019:26: [3] (random) random: 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. else if (a->random > b->random) data/totem-3.38.0/src/totem-grilo.c:2040:17: [3] (random) g_random_int_range: 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. data.random = g_random_int_range (0, len); data/totem-3.38.0/src/totem-uri.c:435:12: [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. g_get_home_dir ()); data/totem-3.38.0/src/totem-uri.c:487:12: [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. g_get_home_dir ()); data/totem-3.38.0/src/plugins/autoload-subtitles/totem-autoload-subtitles.c:113:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (subtitle + suffix + 1, subtitle_ext[i], 3); data/totem-3.38.0/src/plugins/autoload-subtitles/totem-autoload-subtitles.c:120:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy (subtitle + suffix + 1, subtitle_ext_upper, 3); data/totem-3.38.0/src/plugins/rotation/totem-rotation.c:132:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rotation = atoi (rotation_s); data/totem-3.38.0/src/plugins/save-file/totem-save-file.c:107:10: [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 *sources[2] = { source, NULL }; data/totem-3.38.0/src/plugins/screenshot/screenshot-filename-builder.c:42:3: [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 *base_paths[NUM_TESTS]; data/totem-3.38.0/src/totem-playlist.c:801:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi (str); data/totem-3.38.0/src/plugins/autoload-subtitles/totem-autoload-subtitles.c:87:8: [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). len = strlen (uri); data/totem-3.38.0/src/plugins/skipto/totem-time-entry.c:172:10: [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). width = strlen (time_string); data/totem-3.38.0/src/totem-object.c:681:64: [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_action_map_remove_action (G_ACTION_MAP (totem), action + strlen ("app.")); data/totem-3.38.0/src/totem-uri.c:135:25: [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). path = g_strdup (uri + strlen ("dvd://")); data/totem-3.38.0/src/totem-uri.c:301:8: [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). len = strlen (uri); data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view.c:329:12: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. gboolean equal; data/totem-3.38.0/subprojects/libgd/libgd/gd-main-view.c:355:11: [1] (buffer) equal: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (equal) ANALYSIS SUMMARY: Hits = 27 Lines analyzed = 44719 in approximately 1.01 seconds (44417 lines/second) Physical Source Lines of Code (SLOC) = 31046 Hits@level = [0] 2 [1] 7 [2] 6 [3] 13 [4] 1 [5] 0 Hits@level+ = [0+] 29 [1+] 27 [2+] 20 [3+] 14 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 0.934098 [1+] 0.869677 [2+] 0.644205 [3+] 0.450944 [4+] 0.0322103 [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.