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/aptitude-0.8.13/src/ui_download_manager.h Examining data/aptitude-0.8.13/src/solution_screen.cc Examining data/aptitude-0.8.13/src/download_item.h Examining data/aptitude-0.8.13/src/apt_options.h Examining data/aptitude-0.8.13/src/load_grouppolicy.h Examining data/aptitude-0.8.13/src/apt_config_widgets.h Examining data/aptitude-0.8.13/src/defaults.cc Examining data/aptitude-0.8.13/src/ui.h Examining data/aptitude-0.8.13/src/apt_info_tree.cc Examining data/aptitude-0.8.13/src/ui.cc Examining data/aptitude-0.8.13/src/solution_fragment.cc Examining data/aptitude-0.8.13/src/pkg_view.h Examining data/aptitude-0.8.13/src/menu_redirect.h Examining data/aptitude-0.8.13/src/menu_text_layout.h Examining data/aptitude-0.8.13/src/solution_screen.h Examining data/aptitude-0.8.13/src/load_sortpolicy.h Examining data/aptitude-0.8.13/src/qt/version.h Examining data/aptitude-0.8.13/src/qt/package_pool.h Examining data/aptitude-0.8.13/src/qt/package_pool.cc Examining data/aptitude-0.8.13/src/qt/qt_main.h Examining data/aptitude-0.8.13/src/qt/package.h Examining data/aptitude-0.8.13/src/qt/tabs_manager.cc Examining data/aptitude-0.8.13/src/qt/package.cc Examining data/aptitude-0.8.13/src/qt/widgets/status_widget.h Examining data/aptitude-0.8.13/src/qt/widgets/packages_tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/tab_widget.cc Examining data/aptitude-0.8.13/src/qt/widgets/changes_preview_tab.h Examining data/aptitude-0.8.13/src/qt/widgets/package_info_tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/packages_tab.h Examining data/aptitude-0.8.13/src/qt/widgets/tab.h Examining data/aptitude-0.8.13/src/qt/widgets/resolver_tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/package_info_tab.h Examining data/aptitude-0.8.13/src/qt/widgets/perform_changes_tab.h Examining data/aptitude-0.8.13/src/qt/widgets/tab_widget.h Examining data/aptitude-0.8.13/src/qt/widgets/changes_preview_tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/status_widget.cc Examining data/aptitude-0.8.13/src/qt/widgets/perform_changes_tab.cc Examining data/aptitude-0.8.13/src/qt/widgets/resolver_tab.h Examining data/aptitude-0.8.13/src/qt/version.cc Examining data/aptitude-0.8.13/src/qt/qt_main.cc Examining data/aptitude-0.8.13/src/qt/windows/main_window.cc Examining data/aptitude-0.8.13/src/qt/windows/main_window.h Examining data/aptitude-0.8.13/src/qt/tabs_manager.h Examining data/aptitude-0.8.13/src/aptitude.h Examining data/aptitude-0.8.13/src/pkg_grouppolicy.cc Examining data/aptitude-0.8.13/src/pkg_sortpolicy.cc Examining data/aptitude-0.8.13/src/progress.cc Examining data/aptitude-0.8.13/src/reason_fragment.cc Examining data/aptitude-0.8.13/src/solution_item.cc Examining data/aptitude-0.8.13/src/load_config.h Examining data/aptitude-0.8.13/src/apt_config_treeitems.cc Examining data/aptitude-0.8.13/src/apt_options.cc Examining data/aptitude-0.8.13/src/pkg_view.cc Examining data/aptitude-0.8.13/src/pkg_ver_item.h Examining data/aptitude-0.8.13/src/trust.cc Examining data/aptitude-0.8.13/src/generic/util/job_queue_thread.h Examining data/aptitude-0.8.13/src/generic/util/sqlite.cc Examining data/aptitude-0.8.13/src/generic/util/dynamic_list_collection.h Examining data/aptitude-0.8.13/src/generic/util/progress_info.h Examining data/aptitude-0.8.13/src/generic/util/dynamic_list_impl.h Examining data/aptitude-0.8.13/src/generic/util/refcounted_base.cc Examining data/aptitude-0.8.13/src/generic/util/mut_fun.h Examining data/aptitude-0.8.13/src/generic/util/dynamic_set_transform.h Examining data/aptitude-0.8.13/src/generic/util/immlist.h Examining data/aptitude-0.8.13/src/generic/util/maybe.h Examining data/aptitude-0.8.13/src/generic/util/undo.h Examining data/aptitude-0.8.13/src/generic/util/progress_info.cc Examining data/aptitude-0.8.13/src/generic/util/throttle.h Examining data/aptitude-0.8.13/src/generic/util/throttle.cc Examining data/aptitude-0.8.13/src/generic/util/temp.cc Examining data/aptitude-0.8.13/src/generic/util/setset.h Examining data/aptitude-0.8.13/src/generic/util/compare3.h Examining data/aptitude-0.8.13/src/generic/util/file_cache.h Examining data/aptitude-0.8.13/src/generic/util/refcounted_wrapper.h Examining data/aptitude-0.8.13/src/generic/util/refcounted_base.h Examining data/aptitude-0.8.13/src/generic/util/util.cc Examining data/aptitude-0.8.13/src/generic/util/dynamic_set.h Examining data/aptitude-0.8.13/src/generic/util/file_cache.cc Examining data/aptitude-0.8.13/src/generic/util/enumerator_transform.h Examining data/aptitude-0.8.13/src/generic/util/util.h Examining data/aptitude-0.8.13/src/generic/util/parsers.h Examining data/aptitude-0.8.13/src/generic/util/logging.cc Examining data/aptitude-0.8.13/src/generic/util/immset.h Examining data/aptitude-0.8.13/src/generic/util/undo.cc Examining data/aptitude-0.8.13/src/generic/util/logging.h Examining data/aptitude-0.8.13/src/generic/util/dense_setset.h Examining data/aptitude-0.8.13/src/generic/util/temp.h Examining data/aptitude-0.8.13/src/generic/util/sqlite.h Examining data/aptitude-0.8.13/src/generic/util/dynamic_set_impl.h Examining data/aptitude-0.8.13/src/generic/util/safe_slot.h Examining data/aptitude-0.8.13/src/generic/util/dynamic_list.h Examining data/aptitude-0.8.13/src/generic/util/mocks/mock_util.h Examining data/aptitude-0.8.13/src/generic/util/mocks/throttle.h Examining data/aptitude-0.8.13/src/generic/util/post_thunk.h Examining data/aptitude-0.8.13/src/generic/util/enumerator.h Examining data/aptitude-0.8.13/src/generic/util/dynamic_set_union.h Examining data/aptitude-0.8.13/src/generic/apt/screenshot.h Examining data/aptitude-0.8.13/src/generic/apt/matching/serialize.h Examining data/aptitude-0.8.13/src/generic/apt/matching/compare_patterns.h Examining data/aptitude-0.8.13/src/generic/apt/matching/parse.cc Examining data/aptitude-0.8.13/src/generic/apt/matching/serialize.cc Examining data/aptitude-0.8.13/src/generic/apt/matching/compare_patterns.cc Examining data/aptitude-0.8.13/src/generic/apt/matching/pattern.h Examining data/aptitude-0.8.13/src/generic/apt/matching/pattern.cc Examining data/aptitude-0.8.13/src/generic/apt/matching/parse.h Examining data/aptitude-0.8.13/src/generic/apt/matching/match.h Examining data/aptitude-0.8.13/src/generic/apt/matching/match.cc Examining data/aptitude-0.8.13/src/generic/apt/tags.h Examining data/aptitude-0.8.13/src/generic/apt/pkg_acqfile.cc Examining data/aptitude-0.8.13/src/generic/apt/dpkg.cc Examining data/aptitude-0.8.13/src/generic/apt/globals.cc Examining data/aptitude-0.8.13/src/generic/apt/apt_undo_group.h Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_universe.h Examining data/aptitude-0.8.13/src/generic/apt/desc_parse.cc Examining data/aptitude-0.8.13/src/generic/apt/dpkg_selections.cc Examining data/aptitude-0.8.13/src/generic/apt/config_file.h Examining data/aptitude-0.8.13/src/generic/apt/desc_parse.h Examining data/aptitude-0.8.13/src/generic/apt/pkg_changelog.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_syntax.cc Examining data/aptitude-0.8.13/src/generic/apt/parse_dpkg_status.h Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_types.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_types.h Examining data/aptitude-0.8.13/src/generic/apt/usertags.h Examining data/aptitude-0.8.13/src/generic/apt/dpkg.h Examining data/aptitude-0.8.13/src/generic/apt/tasks.cc Examining data/aptitude-0.8.13/src/generic/apt/dump_packages.cc Examining data/aptitude-0.8.13/src/generic/apt/download_queue.cc Examining data/aptitude-0.8.13/src/generic/apt/download_update_manager.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver.h Examining data/aptitude-0.8.13/src/generic/apt/config_signal.cc Examining data/aptitude-0.8.13/src/generic/apt/download_update_manager.h Examining data/aptitude-0.8.13/src/generic/apt/dump_packages.h Examining data/aptitude-0.8.13/src/generic/apt/tasks.h Examining data/aptitude-0.8.13/src/generic/apt/infer_reason.cc Examining data/aptitude-0.8.13/src/generic/apt/tags.cc Examining data/aptitude-0.8.13/src/generic/apt/dpkg_selections.h Examining data/aptitude-0.8.13/src/generic/apt/screenshot.cc Examining data/aptitude-0.8.13/src/generic/apt/download_manager.cc Examining data/aptitude-0.8.13/src/generic/apt/download_signal_log.cc Examining data/aptitude-0.8.13/src/generic/apt/config_signal.h Examining data/aptitude-0.8.13/src/generic/apt/apt.cc Examining data/aptitude-0.8.13/src/generic/apt/pkg_changelog.h Examining data/aptitude-0.8.13/src/generic/apt/infer_reason.h Examining data/aptitude-0.8.13/src/generic/apt/log.cc Examining data/aptitude-0.8.13/src/generic/apt/download_install_manager.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_settings.h Examining data/aptitude-0.8.13/src/generic/apt/changelog_parse.cc Examining data/aptitude-0.8.13/src/generic/apt/aptcache.h Examining data/aptitude-0.8.13/src/generic/apt/resolver_manager.cc Examining data/aptitude-0.8.13/src/generic/apt/download_queue.h Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_universe.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_settings.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitudepolicy.cc Examining data/aptitude-0.8.13/src/generic/apt/rev_dep_iterator.h Examining data/aptitude-0.8.13/src/generic/apt/log.h Examining data/aptitude-0.8.13/src/generic/apt/aptitudepolicy.h Examining data/aptitude-0.8.13/src/generic/apt/download_signal_log.h Examining data/aptitude-0.8.13/src/generic/apt/resolver_manager.h Examining data/aptitude-0.8.13/src/generic/apt/pkg_acqfile.h Examining data/aptitude-0.8.13/src/generic/apt/aptcache.cc Examining data/aptitude-0.8.13/src/generic/apt/config_file.cc Examining data/aptitude-0.8.13/src/generic/apt/aptitude_resolver_cost_syntax.h Examining data/aptitude-0.8.13/src/generic/apt/parse_dpkg_status.cc Examining data/aptitude-0.8.13/src/generic/apt/usertags.cc Examining data/aptitude-0.8.13/src/generic/apt/apt.h Examining data/aptitude-0.8.13/src/generic/apt/download_manager.h Examining data/aptitude-0.8.13/src/generic/apt/changelog_parse.h Examining data/aptitude-0.8.13/src/generic/apt/download_install_manager.h Examining data/aptitude-0.8.13/src/generic/apt/history/history_entry.h Examining data/aptitude-0.8.13/src/generic/apt/history/history_entry.cc Examining data/aptitude-0.8.13/src/generic/apt/apt_undo_group.cc Examining data/aptitude-0.8.13/src/generic/views/search_input.h Examining data/aptitude-0.8.13/src/generic/views/progress.cc Examining data/aptitude-0.8.13/src/generic/views/search_input.cc Examining data/aptitude-0.8.13/src/generic/views/download_progress.cc Examining data/aptitude-0.8.13/src/generic/views/mocks/search_input.h Examining data/aptitude-0.8.13/src/generic/views/mocks/download_progress.cc Examining data/aptitude-0.8.13/src/generic/views/mocks/download_progress.h Examining data/aptitude-0.8.13/src/generic/views/mocks/progress.h Examining data/aptitude-0.8.13/src/generic/views/progress.h Examining data/aptitude-0.8.13/src/generic/views/download_progress.h Examining data/aptitude-0.8.13/src/generic/controllers/search_input.h Examining data/aptitude-0.8.13/src/generic/controllers/search_input.cc Examining data/aptitude-0.8.13/src/generic/controllers/acquire_download_progress.h Examining data/aptitude-0.8.13/src/generic/controllers/acquire_download_progress.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/cost.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/resolver_undo.h Examining data/aptitude-0.8.13/src/generic/problemresolver/test.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/choice_indexed_map.h Examining data/aptitude-0.8.13/src/generic/problemresolver/cost.h Examining data/aptitude-0.8.13/src/generic/problemresolver/sanity_check_universe.h Examining data/aptitude-0.8.13/src/generic/problemresolver/solution.h Examining data/aptitude-0.8.13/src/generic/problemresolver/incremental_expression.h Examining data/aptitude-0.8.13/src/generic/problemresolver/dummy_universe.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/exceptions.h Examining data/aptitude-0.8.13/src/generic/problemresolver/cost_limits.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/choice.h Examining data/aptitude-0.8.13/src/generic/problemresolver/dummy_universe.h Examining data/aptitude-0.8.13/src/generic/problemresolver/search_graph.h Examining data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h Examining data/aptitude-0.8.13/src/generic/problemresolver/promotion_set.h Examining data/aptitude-0.8.13/src/generic/problemresolver/choice_set.h Examining data/aptitude-0.8.13/src/generic/problemresolver/cost_limits.h Examining data/aptitude-0.8.13/src/generic/problemresolver/incremental_expression.cc Examining data/aptitude-0.8.13/src/generic/problemresolver/dump_universe.h Examining data/aptitude-0.8.13/src/pkg_columnizer.h Examining data/aptitude-0.8.13/src/download_item.cc Examining data/aptitude-0.8.13/src/loggers.h Examining data/aptitude-0.8.13/src/pkg_ver_item.cc Examining data/aptitude-0.8.13/src/apt_config_treeitems.h Examining data/aptitude-0.8.13/src/solution_fragment.h Examining data/aptitude-0.8.13/src/trust.h Examining data/aptitude-0.8.13/src/solution_dialog.h Examining data/aptitude-0.8.13/src/pkg_item_with_subtree.h Examining data/aptitude-0.8.13/src/pkg_item.cc Examining data/aptitude-0.8.13/src/ui_download_manager.cc Examining data/aptitude-0.8.13/src/pkg_subtree.h Examining data/aptitude-0.8.13/src/download_thread.h Examining data/aptitude-0.8.13/src/dep_item.cc Examining data/aptitude-0.8.13/src/download_list.cc Examining data/aptitude-0.8.13/src/pkg_tree.h Examining data/aptitude-0.8.13/src/broken_indicator.h Examining data/aptitude-0.8.13/src/load_sortpolicy.cc Examining data/aptitude-0.8.13/src/apt_undo_tree.cc Examining data/aptitude-0.8.13/src/pkg_node.h Examining data/aptitude-0.8.13/src/apt_undo_tree.h Examining data/aptitude-0.8.13/src/desc_render.cc Examining data/aptitude-0.8.13/src/desc_render.h Examining data/aptitude-0.8.13/src/download_list.h Examining data/aptitude-0.8.13/src/solution_item.h Examining data/aptitude-0.8.13/src/download_thread.cc Examining data/aptitude-0.8.13/src/dep_item.h Examining data/aptitude-0.8.13/src/pkg_sortpolicy.h Examining data/aptitude-0.8.13/src/view_changelog.cc Examining data/aptitude-0.8.13/src/view_changelog.h Examining data/aptitude-0.8.13/src/pkg_columnizer.cc Examining data/aptitude-0.8.13/src/loggers.cc Examining data/aptitude-0.8.13/src/pkg_tree.cc Examining data/aptitude-0.8.13/src/pkg_subtree.cc Examining data/aptitude-0.8.13/src/mine/cmine.h Examining data/aptitude-0.8.13/src/mine/cmine.cc Examining data/aptitude-0.8.13/src/mine/board.h Examining data/aptitude-0.8.13/src/mine/board.cc Examining data/aptitude-0.8.13/src/menu_tree.h Examining data/aptitude-0.8.13/src/safe_slot_event.h Examining data/aptitude-0.8.13/src/pkg_node.cc Examining data/aptitude-0.8.13/src/load_pkgview.h Examining data/aptitude-0.8.13/src/load_config.cc Examining data/aptitude-0.8.13/src/pkg_info_screen.h Examining data/aptitude-0.8.13/src/pkg_item.h Examining data/aptitude-0.8.13/src/reason_fragment.h Examining data/aptitude-0.8.13/src/menu_redirect.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_update.cc Examining data/aptitude-0.8.13/src/cmdline/transient_message.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_extract_cache_subset.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_update.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_simulate.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_clean.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_action.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_util.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_why.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_moo.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_changelog.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_prompt.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_resolver.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_user_tag.cc Examining data/aptitude-0.8.13/src/cmdline/text_progress.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_user_tag.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_resolver.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_progress_display.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_common.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_util.h Examining data/aptitude-0.8.13/src/cmdline/terminal.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_show.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_apt_proxy.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_apt_proxy.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_download_progress_display.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_progress_display.h Examining data/aptitude-0.8.13/src/cmdline/text_progress.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_spinner.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_mark.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_moo.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_main_loop.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_do_action.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_show_broken.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_show_broken.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_search_progress.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_action.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_show.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_dump_resolver.h Examining data/aptitude-0.8.13/src/cmdline/transient_message.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_dump_resolver.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_forget_new.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_main_loop.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_versions.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_why.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_clean.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_extract_cache_subset.cc Examining data/aptitude-0.8.13/src/cmdline/terminal.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_prompt.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_mark.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_changelog.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_search.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_simulate.cc Examining data/aptitude-0.8.13/src/cmdline/mocks/transient_message.h Examining data/aptitude-0.8.13/src/cmdline/mocks/download_status_display.cc Examining data/aptitude-0.8.13/src/cmdline/mocks/terminal.h Examining data/aptitude-0.8.13/src/cmdline/mocks/teletype.cc Examining data/aptitude-0.8.13/src/cmdline/mocks/terminal.cc Examining data/aptitude-0.8.13/src/cmdline/mocks/download_status_display.h Examining data/aptitude-0.8.13/src/cmdline/mocks/teletype.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_download_progress_display.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_search_progress.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_progress.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_progress.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_spinner.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_check_resolver.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_search.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_forget_new.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_check_resolver.h Examining data/aptitude-0.8.13/src/cmdline/cmdline_versions.cc Examining data/aptitude-0.8.13/src/cmdline/cmdline_do_action.cc Examining data/aptitude-0.8.13/src/menu_tree.cc Examining data/aptitude-0.8.13/src/defaults.h Examining data/aptitude-0.8.13/src/apt_info_tree.h Examining data/aptitude-0.8.13/src/menu_text_layout.cc Examining data/aptitude-0.8.13/src/load_pkgview.cc Examining data/aptitude-0.8.13/src/progress.h Examining data/aptitude-0.8.13/src/pkg_info_screen.cc Examining data/aptitude-0.8.13/src/apt_config_widgets.cc Examining data/aptitude-0.8.13/src/load_grouppolicy.cc Examining data/aptitude-0.8.13/src/solution_dialog.cc Examining data/aptitude-0.8.13/src/main.cc Examining data/aptitude-0.8.13/src/broken_indicator.cc Examining data/aptitude-0.8.13/src/gtk/areas.h Examining data/aptitude-0.8.13/src/gtk/screenshot.h Examining data/aptitude-0.8.13/src/gtk/previewtab.h Examining data/aptitude-0.8.13/src/gtk/util/property.h Examining data/aptitude-0.8.13/src/gtk/download.h Examining data/aptitude-0.8.13/src/gtk/init.cc Examining data/aptitude-0.8.13/src/gtk/hyperlink.cc Examining data/aptitude-0.8.13/src/gtk/globals.cc Examining data/aptitude-0.8.13/src/gtk/pkgview.h Examining data/aptitude-0.8.13/src/gtk/screenshot_cache.cc Examining data/aptitude-0.8.13/src/gtk/packageinformation.cc Examining data/aptitude-0.8.13/src/gtk/entitysummary.h Examining data/aptitude-0.8.13/src/gtk/post_event.cc Examining data/aptitude-0.8.13/src/gtk/notify.cc Examining data/aptitude-0.8.13/src/gtk/changelog.cc Examining data/aptitude-0.8.13/src/gtk/resolver.cc Examining data/aptitude-0.8.13/src/gtk/progress.cc Examining data/aptitude-0.8.13/src/gtk/mainwindow.h Examining data/aptitude-0.8.13/src/gtk/info.cc Examining data/aptitude-0.8.13/src/gtk/notify.h Examining data/aptitude-0.8.13/src/gtk/treeview_cell_tooltips.h Examining data/aptitude-0.8.13/src/gtk/dashboardtab.cc Examining data/aptitude-0.8.13/src/gtk/mainwindow.cc Examining data/aptitude-0.8.13/src/gtk/toplevel/model.h Examining data/aptitude-0.8.13/src/gtk/toplevel/tabs_notebook.cc Examining data/aptitude-0.8.13/src/gtk/toplevel/tabs_notebook.h Examining data/aptitude-0.8.13/src/gtk/toplevel/model.cc Examining data/aptitude-0.8.13/src/gtk/toplevel/sidebar.h Examining data/aptitude-0.8.13/src/gtk/toplevel/view.h Examining data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc Examining data/aptitude-0.8.13/src/gtk/hyperlink.h Examining data/aptitude-0.8.13/src/gtk/areas.cc Examining data/aptitude-0.8.13/src/gtk/packagestab.cc Examining data/aptitude-0.8.13/src/gtk/tab.cc Examining data/aptitude-0.8.13/src/gtk/screenshot.cc Examining data/aptitude-0.8.13/src/gtk/tab.h Examining data/aptitude-0.8.13/src/gtk/dashboardtab.h Examining data/aptitude-0.8.13/src/gtk/treeview_cell_tooltips.cc Examining data/aptitude-0.8.13/src/gtk/download.cc Examining data/aptitude-0.8.13/src/gtk/gui.h Examining data/aptitude-0.8.13/src/gtk/filesview.cc Examining data/aptitude-0.8.13/src/gtk/errortab.h Examining data/aptitude-0.8.13/src/gtk/resolver.h Examining data/aptitude-0.8.13/src/gtk/view-impls/search_input_entry.h Examining data/aptitude-0.8.13/src/gtk/view-impls/search_input_entry.cc Examining data/aptitude-0.8.13/src/gtk/entityview.cc Examining data/aptitude-0.8.13/src/gtk/errortab.cc Examining data/aptitude-0.8.13/src/gtk/dependency_chains_tab.h Examining data/aptitude-0.8.13/src/gtk/packageinformation.h Examining data/aptitude-0.8.13/src/gtk/changelog.h Examining data/aptitude-0.8.13/src/gtk/gui.cc Examining data/aptitude-0.8.13/src/gtk/entityview.h Examining data/aptitude-0.8.13/src/gtk/pkgview.cc Examining data/aptitude-0.8.13/src/gtk/packagestab.h Examining data/aptitude-0.8.13/src/gtk/previewtab.cc Examining data/aptitude-0.8.13/src/gtk/init.h Examining data/aptitude-0.8.13/src/gtk/globals.h Examining data/aptitude-0.8.13/src/gtk/constants.h Examining data/aptitude-0.8.13/src/gtk/filesview.h Examining data/aptitude-0.8.13/src/gtk/screenshot_cache.h Examining data/aptitude-0.8.13/src/gtk/progress.h Examining data/aptitude-0.8.13/src/gtk/post_event.h Examining data/aptitude-0.8.13/src/gtk/info.h Examining data/aptitude-0.8.13/src/gtk/entitysummary.cc Examining data/aptitude-0.8.13/src/gtk/dependency_chains_tab.cc Examining data/aptitude-0.8.13/src/gtk/dpkg_terminal.h Examining data/aptitude-0.8.13/src/pkg_grouppolicy.h Examining data/aptitude-0.8.13/tests/test_logging.cc Examining data/aptitude-0.8.13/tests/interactive_set_test.cc Examining data/aptitude-0.8.13/tests/test_cmdline_download_progress_display.cc Examining data/aptitude-0.8.13/tests/test_teletype_mock.cc Examining data/aptitude-0.8.13/tests/test_enumerator.cc Examining data/aptitude-0.8.13/tests/test_misc.cc Examining data/aptitude-0.8.13/tests/test_parsers.cc Examining data/aptitude-0.8.13/tests/test_resolver_hints.cc Examining data/aptitude-0.8.13/tests/test_cmdline_progress_display.cc Examining data/aptitude-0.8.13/tests/gtest_test_main.cc Examining data/aptitude-0.8.13/tests/boost_test_main.cc Examining data/aptitude-0.8.13/tests/test_file_cache.cc Examining data/aptitude-0.8.13/tests/test_choice.cc Examining data/aptitude-0.8.13/tests/test_config_pusher.cc Examining data/aptitude-0.8.13/tests/test_dense_setset.cc Examining data/aptitude-0.8.13/tests/test_transient_message.cc Examining data/aptitude-0.8.13/tests/test_resolver_costs.cc Examining data/aptitude-0.8.13/tests/test_sqlite.cc Examining data/aptitude-0.8.13/tests/test_dynamic_list.cc Examining data/aptitude-0.8.13/tests/test_incremental_expression.cc Examining data/aptitude-0.8.13/tests/test_promotion_set.cc Examining data/aptitude-0.8.13/tests/test_search_input_controller.cc Examining data/aptitude-0.8.13/tests/test_setset.cc Examining data/aptitude-0.8.13/tests/test_temp.cc Examining data/aptitude-0.8.13/tests/test_resolver.cc Examining data/aptitude-0.8.13/tests/test_wtree.cc Examining data/aptitude-0.8.13/tests/test_matching.cc Examining data/aptitude-0.8.13/tests/test_cmdline_search_progress.cc Examining data/aptitude-0.8.13/tests/test_dynamic_set.cc Examining data/aptitude-0.8.13/tests/test_terminal_mock.cc Examining data/aptitude-0.8.13/tests/test_cmdline_download_status_display.cc Examining data/aptitude-0.8.13/tests/test_choice_set.cc Examining data/aptitude-0.8.13/tests/cppunit_test_main.cc FINAL RESULTS: data/aptitude-0.8.13/src/cmdline/cmdline_apt_proxy.cc:96:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(args[0], args); data/aptitude-0.8.13/src/cmdline/cmdline_changelog.cc:293:6: [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. if(access("/usr/bin/sensible-pager", X_OK)!=0) data/aptitude-0.8.13/src/cmdline/cmdline_changelog.cc:399:6: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system((string(pager) + " " + filename).c_str()) != 0) data/aptitude-0.8.13/src/generic/apt/apt.cc:218:6: [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. access((string(HOME) + "/.aptitude").c_str(), R_OK | X_OK) == 0) data/aptitude-0.8.13/src/generic/apt/apt.cc:227:25: [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. if(!cfgloc.empty() && access(cfgloc.c_str(), R_OK) == 0) data/aptitude-0.8.13/src/generic/apt/changelog_parse.cc:342:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if(system(cmd.c_str()) == 0) data/aptitude-0.8.13/src/generic/apt/download_install_manager.cc:205:10: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if(system("DPKG_NO_TSTP=1 dpkg --configure -a") != 0) { /* ignore */ } data/aptitude-0.8.13/src/generic/apt/dpkg.cc:110:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(Args[0], (char**) &Args[0]); data/aptitude-0.8.13/src/generic/apt/dpkg_selections.cc:136:7: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp(command, const_cast<char**>(args)); data/aptitude-0.8.13/src/generic/apt/log.cc:52:9: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. f = popen(log.c_str()+1, "w"); data/aptitude-0.8.13/src/generic/apt/resolver_manager.cc:500:4: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/tar", "/bin/tar", "czf", data/aptitude-0.8.13/src/generic/util/logging.cc:273:20: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. return **system; data/aptitude-0.8.13/src/generic/util/temp.cc:131:14: [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. if(access(result.c_str(), F_OK) != 0) data/aptitude-0.8.13/src/generic/util/temp.cc:185:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmpl, tmpl_str.c_str()); data/aptitude-0.8.13/src/generic/util/temp.cc:246:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(tmpl, tmpl_str.c_str()); data/aptitude-0.8.13/src/generic/util/util.cc:132:19: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int amt = vsnprintf(buf, initbufsize, format, ap); data/aptitude-0.8.13/src/generic/util/util.cc:141:24: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. const int amt2 = vsnprintf(buf2, buf2size, format, ap2); data/aptitude-0.8.13/src/generic/util/util.cc:167:13: [4] (format) vswprintf: Potential format string problem (CWE-134). Make format string constant. int amt = vswprintf(buf, initbufsize, format, ap); data/aptitude-0.8.13/src/generic/util/util.cc:175:18: [4] (format) vswprintf: Potential format string problem (CWE-134). Make format string constant. int amt2 = vswprintf(buf2, initbufsize, format, ap); data/aptitude-0.8.13/src/generic/util/util.h:71:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf, 1, 2))) data/aptitude-0.8.13/src/load_grouppolicy.cc:57:29: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf, 2, 3))) data/aptitude-0.8.13/src/main.cc:187:3: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(PACKAGE " " VERSION "\n"); data/aptitude-0.8.13/src/mine/cmine.cc:678:10: [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. if(access(buf.c_str(), R_OK)!=0) data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1146:7: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buf, 512, W_("Bad number in format string: %ls").c_str(), data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1155:7: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buf, 512, W_("Match indices must be 1 or greater, not \"%s\"").c_str(), data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1173:7: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buf, 1024, W_("Match index %ls is too large; available groups are (%s)").c_str(), data/aptitude-0.8.13/src/pkg_tree.cc:295:4: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf(buf, 512, W_("No packages matched the pattern \"%ls\".").c_str(), data/aptitude-0.8.13/src/ui.cc:536:4: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(root_program.c_str(), root_program.c_str(), "--login", "-c", cmdbuf.str().c_str(), NULL); data/aptitude-0.8.13/src/ui.cc:569:4: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execv(real_cmd[0], const_cast<char* const*>(real_cmd)); data/aptitude-0.8.13/src/ui.cc:1164:6: [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. if(access(filename.c_str(), R_OK) != 0) data/aptitude-0.8.13/src/ui.cc:1187:6: [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. if(access(readme_file.c_str(), R_OK)!=0) data/aptitude-0.8.13/src/ui.cc:1239:10: [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. if(access(tmpdir_path.c_str(), F_OK) != 0) data/aptitude-0.8.13/src/ui.cc:1252:6: [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. if(access(tmpdir_path.c_str(), F_OK) == 0) data/aptitude-0.8.13/tests/test_temp.cc:81:20: [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. int result = access(d1name.c_str(), F_OK); data/aptitude-0.8.13/tests/test_temp.cc:86:16: [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. result = access(d2.get_name().c_str(), F_OK); data/aptitude-0.8.13/tests/test_temp.cc:124:18: [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. int result = access(d1name.c_str(), F_OK); data/aptitude-0.8.13/tests/test_temp.cc:128:14: [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. result = access(d2name.c_str(), F_OK); data/aptitude-0.8.13/tests/test_temp.cc:166:22: [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. CPPUNIT_ASSERT(access(f.get_name().c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:177:31: [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. CPPUNIT_ASSERT_EQUAL(0, access(f.get_name().c_str(), F_OK)); data/aptitude-0.8.13/tests/test_temp.cc:180:20: [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. CPPUNIT_ASSERT(access(fname.c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:232:22: [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. CPPUNIT_ASSERT(access(f.get_name().c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:244:29: [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. CPPUNIT_ASSERT_EQUAL(0, access(f.get_name().c_str(), F_OK)); data/aptitude-0.8.13/tests/test_temp.cc:249:22: [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. CPPUNIT_ASSERT(access(dname.c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:252:22: [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. CPPUNIT_ASSERT(access(fname.c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:286:20: [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. CPPUNIT_ASSERT(access(f.get_name().c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:297:29: [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. CPPUNIT_ASSERT_EQUAL(0, access(f.get_name().c_str(), F_OK)); data/aptitude-0.8.13/tests/test_temp.cc:336:22: [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. CPPUNIT_ASSERT(access(f.get_name().c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:348:29: [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. CPPUNIT_ASSERT_EQUAL(0, access(f.get_name().c_str(), F_OK)); data/aptitude-0.8.13/tests/test_temp.cc:377:23: [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. CPPUNIT_ASSERT(access(dname.c_str(), F_OK) != 0); data/aptitude-0.8.13/tests/test_temp.cc:380:23: [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. CPPUNIT_ASSERT(access(fname.c_str(), F_OK) != 0); data/aptitude-0.8.13/src/cmdline/cmdline_changelog.cc:297:13: [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. pager=getenv("PAGER"); data/aptitude-0.8.13/src/cmdline/terminal.cc:125:29: [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. const char* env_COLUMNS = getenv("COLUMNS"); data/aptitude-0.8.13/src/generic/apt/apt.cc:213:22: [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. const char *HOME = getenv("HOME"); data/aptitude-0.8.13/src/generic/apt/apt.cc:506:25: [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. const char* env_HOME = getenv("HOME"); data/aptitude-0.8.13/src/generic/apt/apt.cc:520:38: [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. const char* env_XDG_CACHE_HOME = getenv("XDG_CACHE_HOME"); data/aptitude-0.8.13/src/generic/apt/apt.cc:528:25: [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. const char* env_HOME = getenv("HOME"); data/aptitude-0.8.13/src/generic/apt/config_file.cc:137:25: [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. const char* envHOME = getenv("HOME"); data/aptitude-0.8.13/src/generic/apt/dpkg.cc:100:31: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. if (chrootDir != "/" && chroot(chrootDir.c_str()) != 0) data/aptitude-0.8.13/src/generic/apt/dpkg_selections.cc:117:27: [3] (misc) chroot: chroot can be very helpful, but is hard to use correctly (CWE-250, CWE-22). Make sure the program immediately chdir("/"), closes file descriptors, and drops root privileges, and that all necessary files (and no more!) are in the new root. int chroot_status = chroot(chroot_dir.c_str()); data/aptitude-0.8.13/src/generic/util/temp.cc:168:26: [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. const char *tmpdir = getenv("TMPDIR"); data/aptitude-0.8.13/src/generic/util/temp.cc:171:16: [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. tmpdir = getenv("TMP"); data/aptitude-0.8.13/src/generic/util/util.cc:480:26: [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. const char* TERM = getenv("TERM"); data/aptitude-0.8.13/src/main.cc:655:3: [3] (random) srandom: 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. srandom(time(0)); data/aptitude-0.8.13/src/main.cc:683:32: [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. const char * const rootdir = getenv("APT_ROOT_DIR"); data/aptitude-0.8.13/src/main.cc:765:17: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while((curopt=getopt_long(argc, argv, "DVZWvhS:uiF:w:sO:fdyPt:q::Rro:", opts, NULL))!=-1) data/aptitude-0.8.13/src/mine/cmine.cc:918:3: [3] (random) srand: 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. srand(time(0)); data/aptitude-0.8.13/src/cmdline/cmdline_prompt.cc:367:14: [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 const char *cmdline_action_descriptions[num_pkg_action_states]={ data/aptitude-0.8.13/src/cmdline/cmdline_prompt.cc:390: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 buf[1024]; data/aptitude-0.8.13/src/cmdline/cmdline_prompt.cc:467:4: [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[1024]; data/aptitude-0.8.13/src/cmdline/cmdline_prompt.cc:588:4: [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[1024]; data/aptitude-0.8.13/src/cmdline/terminal.cc:97: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[1024]; data/aptitude-0.8.13/src/cmdline/terminal.cc:128:19: [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 std::atoi(env_COLUMNS); data/aptitude-0.8.13/src/download_item.cc:97:8: [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 intbuf[bufsize]; data/aptitude-0.8.13/src/download_list.cc:316:4: [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 intbuf[bufsize]; data/aptitude-0.8.13/src/generic/apt/aptcache.cc:1969: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(target->PkgState, PkgState, sizeof(StateCache)*Head().PackageCount); data/aptitude-0.8.13/src/generic/apt/aptcache.cc:1970: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(target->DepState, DepState, sizeof(char)*Head().DependsCount); data/aptitude-0.8.13/src/generic/apt/aptcache.cc:2381: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(PkgState, snapshot->PkgState, sizeof(StateCache)*Head().PackageCount); data/aptitude-0.8.13/src/generic/apt/aptcache.cc:2382: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(DepState, snapshot->DepState, sizeof(char)*Head().DependsCount); data/aptitude-0.8.13/src/generic/apt/dpkg.cc:106:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int const nullfd = open("/dev/null", O_RDONLY); data/aptitude-0.8.13/src/generic/apt/dpkg_selections.cc:103:21: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd_null = open("/dev/null", O_RDONLY); data/aptitude-0.8.13/src/generic/apt/dump_packages.cc:531:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int infd = open(inFileName.c_str(), O_RDONLY); data/aptitude-0.8.13/src/generic/apt/dump_packages.cc:631:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int infd = open(infilename.c_str(), O_RDONLY); data/aptitude-0.8.13/src/generic/apt/dump_packages.cc:664:18: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int infd = open(in.c_str(), O_RDONLY); data/aptitude-0.8.13/src/generic/apt/dump_packages.cc:672:19: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int outfd = open(out.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666); data/aptitude-0.8.13/src/generic/apt/log.cc:54:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(log.c_str(), "a"); data/aptitude-0.8.13/src/generic/apt/matching/pattern.cc:53:4: [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[bufsize]; data/aptitude-0.8.13/src/generic/apt/resolver_manager.cc:1130:31: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). rval.open_size = c.open; data/aptitude-0.8.13/src/generic/apt/tags.cc:219: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 buf[buf_size]; data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:513:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). size_t open; data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:533:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). : open(0), closed(0), deferred(0), conflicts(0), promotions(0), data/aptitude-0.8.13/src/generic/problemresolver/test.cc:434:23: [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). int step_count=atoi(s.c_str()); data/aptitude-0.8.13/src/generic/util/file_cache.cc:590:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sqlite::blob::open(*store, data/aptitude-0.8.13/src/generic/util/file_cache.cc:599:7: [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[block_size]; data/aptitude-0.8.13/src/generic/util/file_cache.cc:740:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). sqlite::blob::open(*store, data/aptitude-0.8.13/src/generic/util/file_cache.cc:748:7: [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[block_size]; data/aptitude-0.8.13/src/generic/util/parsers.h:2887:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). between(const Open &open, const Body &body, const Close &close) data/aptitude-0.8.13/src/generic/util/parsers.h:2889:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open >> (body << close); data/aptitude-0.8.13/src/generic/util/sqlite.cc:406:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). blob::open(db &parent, data/aptitude-0.8.13/src/generic/util/sqlite.h:578:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(db &parent, data/aptitude-0.8.13/src/generic/util/temp.cc:184:5: [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 tmpl[tmpl_str.length() + 1]; data/aptitude-0.8.13/src/generic/util/temp.cc:245:5: [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 tmpl[tmpl_str.length() + 1]; data/aptitude-0.8.13/src/generic/util/util.cc:131: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 buf[initbufsize]; data/aptitude-0.8.13/src/generic/util/util.cc:166:3: [2] (buffer) wchar_t: 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. wchar_t buf[initbufsize]; data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:97:6: [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[1024]; data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:525:5: [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 timebuf[512] = ""; data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:531:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(timebuf, "ERR"); data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:560:7: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(timebuf, "ERR"); data/aptitude-0.8.13/src/gtk/gui.cc:505:6: [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[1024]; data/aptitude-0.8.13/src/gtk/screenshot_cache.cc:158:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fdnum = open(name.get_name().c_str(), O_RDONLY); data/aptitude-0.8.13/src/pkg_columnizer.cc:388:4: [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]; data/aptitude-0.8.13/src/pkg_columnizer.cc:401:2: [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[bufsize] = ""; data/aptitude-0.8.13/src/pkg_columnizer.cc:416:6: [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[256]; data/aptitude-0.8.13/src/pkg_columnizer.cc:573:2: [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[256]; data/aptitude-0.8.13/src/pkg_columnizer.cc:587:2: [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[100]; data/aptitude-0.8.13/src/pkg_columnizer.h:74:16: [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 const char *column_names[numtypes]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:434:16: [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 const char * const state_titles[numgroups]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:866:2: [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]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:962: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 relevance[2]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1144:7: [2] (buffer) wchar_t: 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. wchar_t buf[512]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1154:7: [2] (buffer) wchar_t: 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. wchar_t buf[512]; data/aptitude-0.8.13/src/pkg_grouppolicy.cc:1172:7: [2] (buffer) wchar_t: 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. wchar_t buf[1024]; data/aptitude-0.8.13/src/pkg_tree.cc:293:4: [2] (buffer) wchar_t: 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. wchar_t buf[512]; data/aptitude-0.8.13/src/pkg_ver_item.cc:345:2: [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[100]; data/aptitude-0.8.13/src/ui.cc:514:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(fifoname.get_name().c_str(), O_RDONLY); data/aptitude-0.8.13/src/ui.cc:594:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd=open(fifoname.get_name().c_str(), O_WRONLY); data/aptitude-0.8.13/tests/test_sqlite.cc:99:11: [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 arr[2] = { 0x54, 0x12 }; data/aptitude-0.8.13/tests/test_sqlite.cc:252:18: [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 unsigned char data[8] = { 0x54, 0x10, 0x20, 0x67, data/aptitude-0.8.13/tests/test_sqlite.cc:398: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. const char testBlobData[7] = { 0, 0, 0, 0, 0, 0, 0 }; data/aptitude-0.8.13/tests/test_sqlite.cc:442:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:448:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). BOOST_CHECK_THROW(blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:454:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). BOOST_CHECK_THROW(blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:460:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). BOOST_CHECK_THROW(blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:468:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). BOOST_CHECK_THROW(blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:478:35: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). std::shared_ptr<blob> b = blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:489:35: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). std::shared_ptr<blob> b = blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_sqlite.cc:495: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 contents[3]; data/aptitude-0.8.13/tests/test_sqlite.cc:509: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. const char data[2] = { 0x54, 0x11 }; data/aptitude-0.8.13/tests/test_sqlite.cc:511:37: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). std::shared_ptr<blob> b = blob::open(*tmpdb, data/aptitude-0.8.13/tests/test_temp.cc:170:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(fname.c_str(), O_EXCL | O_CREAT | O_WRONLY, 0700); data/aptitude-0.8.13/tests/test_temp.cc:237:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(fname.c_str(), O_EXCL | O_CREAT | O_WRONLY, 0700); data/aptitude-0.8.13/tests/test_temp.cc:290:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname.c_str(), O_EXCL | O_CREAT | O_WRONLY, 0700); data/aptitude-0.8.13/tests/test_temp.cc:341:14: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(fname.c_str(), O_EXCL | O_CREAT | O_WRONLY, 0700); data/aptitude-0.8.13/src/cmdline/cmdline_do_action.cc:273:14: [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). int tmp = strlen(argv[i]) - 1; data/aptitude-0.8.13/src/cmdline/cmdline_do_action.cc:308: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). target = std::string(argv[i], 0, strlen(argv[i]) - 3); data/aptitude-0.8.13/src/cmdline/cmdline_show.cc:282:22: [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). curverstr+strlen(curverstr), data/aptitude-0.8.13/src/cmdline/cmdline_show.cc:284:23: [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). instverstr+strlen(instverstr)); data/aptitude-0.8.13/src/cmdline/cmdline_show_broken.cc:94:28: [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). size_t indent_dep = strlen(dep.DepType()) + 3; data/aptitude-0.8.13/src/generic/apt/apt.cc:554:30: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t previous_umask = umask(0077); data/aptitude-0.8.13/src/generic/apt/apt.cc:565:6: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(previous_umask); data/aptitude-0.8.13/src/generic/apt/apt.cc:1175:80: [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). int cmpresult = _system->VS->DoCmpVersion(d1.TargetVer(), d1.TargetVer()+strlen(d1.TargetVer()), data/aptitude-0.8.13/src/generic/apt/apt.cc:1176:38: [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). d2.TargetVer(), d2.TargetVer()+strlen(d2.TargetVer())); data/aptitude-0.8.13/src/generic/apt/dump_packages.cc:401:47: [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(static_cast<size_t>(colon - start) != strlen(*fld)) data/aptitude-0.8.13/src/generic/apt/matching/compare_patterns.cc:162:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:1109:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:2129:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:2344:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:2471:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:2671:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/match.cc:2964:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/pattern.cc:128:17: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/apt/matching/pattern.h:350:4: [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. equal, data/aptitude-0.8.13/src/generic/apt/matching/pattern.h:1264:21: [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. return new pattern(equal, stack_position); data/aptitude-0.8.13/src/generic/apt/matching/pattern.h:1270:16: [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. eassert(tp == equal); data/aptitude-0.8.13/src/generic/apt/matching/serialize.cc:319:18: [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. case pattern::equal: data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4265:28: [1] (buffer) mismatch: 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. std::optional<choice> &mismatch; data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4273:2: [1] (buffer) mismatch: 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. mismatch(_mismatch), data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4277:7: [1] (buffer) mismatch: 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. mismatch.reset(); data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4284:16: [1] (buffer) mismatch: 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. else if(!mismatch) data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4306:24: [1] (buffer) mismatch: 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. std::optional<choice> mismatch; data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4308:14: [1] (buffer) mismatch: 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. mismatch, data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4324:15: [1] (buffer) mismatch: 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. else if(!mismatch) data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4326:53: [1] (buffer) mismatch: 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. else if(!s.deps_solved_by_choice.contains_key(*mismatch)) data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4330:8: [1] (buffer) mismatch: 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. << *mismatch << " is not a solver."); data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4336:10: [1] (buffer) mismatch: 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. << *mismatch << "."); data/aptitude-0.8.13/src/generic/problemresolver/problemresolver.h:4337:31: [1] (buffer) mismatch: 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. increase_solver_cost(s, p, *mismatch); data/aptitude-0.8.13/src/generic/problemresolver/test.cc:480:6: [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. equal && !pi.end(); ++pi) data/aptitude-0.8.13/src/generic/problemresolver/test.cc:496: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. if(equal) data/aptitude-0.8.13/src/generic/util/file_cache.cc:608:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int amt_read = read(fd.Fd(), buf, curr_amt); data/aptitude-0.8.13/src/generic/util/file_cache.cc:766:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). blob_data->read(blob_offset, buf, curr_amt); data/aptitude-0.8.13/src/generic/util/sqlite.cc:382:74: [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). const int result = sqlite3_bind_text(handle, parameter_idx, value, strlen(value), dx); data/aptitude-0.8.13/src/generic/util/sqlite.cc:453:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void blob::read(int offset, void *out, int length) data/aptitude-0.8.13/src/generic/util/sqlite.h:600:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(int offset, void *out, int length); data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:393:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, name.get_name().c_str(), max_socket_name); data/aptitude-0.8.13/src/gtk/dpkg_terminal.cc:471:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sun_path, name.get_name().c_str(), max_socket_name); data/aptitude-0.8.13/src/gtk/gui.cc:512:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). amt = read(child_output_fd, buf, buf_len); data/aptitude-0.8.13/src/gtk/screenshot_cache.cc:195:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while( (amt_read = read(fdnum, buf, blockSize)) > 0) data/aptitude-0.8.13/src/pkg_columnizer.cc:74:4: [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). {strlen(PACKAGE), false, false}, // progname data/aptitude-0.8.13/src/pkg_columnizer.cc:75:4: [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). {strlen(VERSION), false, false}, // progver data/aptitude-0.8.13/src/trust.cc:19: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). strlen(_("WARNING"))+2, data/aptitude-0.8.13/src/ui.cc:515:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read(fd, &tmp, 1) < 0) data/aptitude-0.8.13/src/ui.cc:1283:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = getchar(); data/aptitude-0.8.13/src/ui.cc:1292:10: [1] (buffer) getchar: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). c = getchar(); data/aptitude-0.8.13/tests/test_sqlite.cc:86:28: [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). BOOST_CHECK_EQUAL(len, strlen(fiftytwo)); data/aptitude-0.8.13/tests/test_sqlite.cc:87:56: [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). BOOST_CHECK_EQUAL_COLLECTIONS(fiftytwo, fiftytwo + strlen(fiftytwo), data/aptitude-0.8.13/tests/test_sqlite.cc:93:28: [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). BOOST_CHECK_EQUAL(len, strlen(contusion)); data/aptitude-0.8.13/tests/test_sqlite.cc:94:58: [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). BOOST_CHECK_EQUAL_COLLECTIONS(contusion, contusion + strlen(contusion), data/aptitude-0.8.13/tests/test_sqlite.cc:497:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b->read(0, contents, 2); data/aptitude-0.8.13/tests/test_sqlite.cc:500:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). b->read(0, contents, 2); data/aptitude-0.8.13/tests/test_sqlite.cc:504:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). BOOST_CHECK_THROW(b->read(0, contents, 3), exception); ANALYSIS SUMMARY: Hits = 199 Lines analyzed = 147840 in approximately 3.19 seconds (46274 lines/second) Physical Source Lines of Code (SLOC) = 95086 Hits@level = [0] 320 [1] 57 [2] 76 [3] 16 [4] 50 [5] 0 Hits@level+ = [0+] 519 [1+] 199 [2+] 142 [3+] 66 [4+] 50 [5+] 0 Hits/KSLOC@level+ = [0+] 5.45822 [1+] 2.09284 [2+] 1.49338 [3+] 0.694108 [4+] 0.52584 [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.