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/libsmdev-20190315/common/config_msc.h Examining data/libsmdev-20190315/common/byte_stream.h Examining data/libsmdev-20190315/common/common.h Examining data/libsmdev-20190315/common/system_string.h Examining data/libsmdev-20190315/common/types.h Examining data/libsmdev-20190315/common/config_winapi.h Examining data/libsmdev-20190315/common/memory.h Examining data/libsmdev-20190315/common/config.h Examining data/libsmdev-20190315/common/narrow_string.h Examining data/libsmdev-20190315/common/file_stream.h Examining data/libsmdev-20190315/common/config_borlandc.h Examining data/libsmdev-20190315/common/wide_string.h Examining data/libsmdev-20190315/smdevtools/smdevtools_getopt.c Examining data/libsmdev-20190315/smdevtools/info_handle.c Examining data/libsmdev-20190315/smdevtools/smdevtools_libsmdev.h Examining data/libsmdev-20190315/smdevtools/smdevtools_getopt.h Examining data/libsmdev-20190315/smdevtools/smdevtools_signal.c Examining data/libsmdev-20190315/smdevtools/smdevtools_libcnotify.h Examining data/libsmdev-20190315/smdevtools/smdevtools_i18n.h Examining data/libsmdev-20190315/smdevtools/smdevtools_output.h Examining data/libsmdev-20190315/smdevtools/smdevtools_libuna.h Examining data/libsmdev-20190315/smdevtools/smdevtools_libbfio.h Examining data/libsmdev-20190315/smdevtools/smdevtools_signal.h Examining data/libsmdev-20190315/smdevtools/byte_size_string.c Examining data/libsmdev-20190315/smdevtools/smdevinfo.c Examining data/libsmdev-20190315/smdevtools/info_handle.h Examining data/libsmdev-20190315/smdevtools/smdevtools_libclocale.h Examining data/libsmdev-20190315/smdevtools/byte_size_string.h Examining data/libsmdev-20190315/smdevtools/smdevtools_libcerror.h Examining data/libsmdev-20190315/smdevtools/smdevtools_output.c Examining data/libsmdev-20190315/smdevtools/smdevtools_unused.h Examining data/libsmdev-20190315/tests/smdev_test_handle.c Examining data/libsmdev-20190315/tests/smdev_test_unused.h Examining data/libsmdev-20190315/tests/smdev_test_libcerror.h Examining data/libsmdev-20190315/tests/smdev_test_memory.h Examining data/libsmdev-20190315/tests/smdev_test_libuna.h Examining data/libsmdev-20190315/tests/smdev_test_track_value.c Examining data/libsmdev-20190315/tests/smdev_test_functions.h Examining data/libsmdev-20190315/tests/smdev_test_scsi.c Examining data/libsmdev-20190315/tests/smdev_test_libsmdev.h Examining data/libsmdev-20190315/tests/smdev_test_optical_disc.c Examining data/libsmdev-20190315/tests/smdev_test_notify.c Examining data/libsmdev-20190315/tests/smdev_test_support.c Examining data/libsmdev-20190315/tests/smdev_test_ata.c Examining data/libsmdev-20190315/tests/smdev_test_getopt.c Examining data/libsmdev-20190315/tests/smdev_test_libcnotify.h Examining data/libsmdev-20190315/tests/smdev_test_error.c Examining data/libsmdev-20190315/tests/smdev_test_libcfile.h Examining data/libsmdev-20190315/tests/smdev_test_sector_range.c Examining data/libsmdev-20190315/tests/smdev_test_macros.h Examining data/libsmdev-20190315/tests/smdev_test_memory.c Examining data/libsmdev-20190315/tests/smdev_test_functions.c Examining data/libsmdev-20190315/tests/smdev_test_string.c Examining data/libsmdev-20190315/tests/smdev_test_libclocale.h Examining data/libsmdev-20190315/tests/smdev_test_getopt.h Examining data/libsmdev-20190315/libclocale/libclocale_wide_string.h Examining data/libsmdev-20190315/libclocale/libclocale_support.c Examining data/libsmdev-20190315/libclocale/libclocale_locale.h Examining data/libsmdev-20190315/libclocale/libclocale_locale.c Examining data/libsmdev-20190315/libclocale/libclocale_extern.h Examining data/libsmdev-20190315/libclocale/libclocale_unused.h Examining data/libsmdev-20190315/libclocale/libclocale_support.h Examining data/libsmdev-20190315/libclocale/libclocale_definitions.h Examining data/libsmdev-20190315/libclocale/libclocale_codepage.h Examining data/libsmdev-20190315/libclocale/libclocale_codepage.c Examining data/libsmdev-20190315/libclocale/libclocale_wide_string.c Examining data/libsmdev-20190315/libclocale/libclocale_libcerror.h Examining data/libsmdev-20190315/libsmdev/libsmdev_string.h Examining data/libsmdev-20190315/libsmdev/libsmdev_definitions.h Examining data/libsmdev-20190315/libsmdev/libsmdev_sector_range.c Examining data/libsmdev-20190315/libsmdev/libsmdev_usb.h Examining data/libsmdev-20190315/libsmdev/libsmdev_error.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libcnotify.h Examining data/libsmdev-20190315/libsmdev/libsmdev_track_value.h Examining data/libsmdev-20190315/libsmdev/libsmdev_notify.h Examining data/libsmdev-20190315/libsmdev/libsmdev_string.c Examining data/libsmdev-20190315/libsmdev/libsmdev_ata.c Examining data/libsmdev-20190315/libsmdev/libsmdev_unused.h Examining data/libsmdev-20190315/libsmdev/libsmdev_error.c Examining data/libsmdev-20190315/libsmdev/libsmdev_handle.c Examining data/libsmdev-20190315/libsmdev/libsmdev_optical_disc.h Examining data/libsmdev-20190315/libsmdev/libsmdev_scsi.h Examining data/libsmdev-20190315/libsmdev/libsmdev_handle.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libcdata.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libcfile.h Examining data/libsmdev-20190315/libsmdev/libsmdev_usb.c Examining data/libsmdev-20190315/libsmdev/libsmdev.c Examining data/libsmdev-20190315/libsmdev/libsmdev_ata.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libcerror.h Examining data/libsmdev-20190315/libsmdev/libsmdev_sector_range.h Examining data/libsmdev-20190315/libsmdev/libsmdev_codepage.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libuna.h Examining data/libsmdev-20190315/libsmdev/libsmdev_scsi.c Examining data/libsmdev-20190315/libsmdev/libsmdev_track_value.c Examining data/libsmdev-20190315/libsmdev/libsmdev_support.h Examining data/libsmdev-20190315/libsmdev/libsmdev_types.h Examining data/libsmdev-20190315/libsmdev/libsmdev_debug.c Examining data/libsmdev-20190315/libsmdev/libsmdev_optical_disc.c Examining data/libsmdev-20190315/libsmdev/libsmdev_notify.c Examining data/libsmdev-20190315/libsmdev/libsmdev_extern.h Examining data/libsmdev-20190315/libsmdev/libsmdev_support.c Examining data/libsmdev-20190315/libsmdev/libsmdev_debug.h Examining data/libsmdev-20190315/libsmdev/libsmdev_libclocale.h Examining data/libsmdev-20190315/include/libsmdev/extern.h Examining data/libsmdev-20190315/include/libsmdev/types.h Examining data/libsmdev-20190315/include/libsmdev/features.h Examining data/libsmdev-20190315/include/libsmdev/definitions.h Examining data/libsmdev-20190315/include/libsmdev/codepage.h Examining data/libsmdev-20190315/include/libsmdev/error.h Examining data/libsmdev-20190315/include/libsmdev.h Examining data/libsmdev-20190315/pysmdev/pysmdev_libsmdev.h Examining data/libsmdev-20190315/pysmdev/pysmdev_integer.c Examining data/libsmdev-20190315/pysmdev/pysmdev_error.h Examining data/libsmdev-20190315/pysmdev/pysmdev_handle.h Examining data/libsmdev-20190315/pysmdev/pysmdev_error.c Examining data/libsmdev-20190315/pysmdev/pysmdev_python.h Examining data/libsmdev-20190315/pysmdev/pysmdev_libcerror.h Examining data/libsmdev-20190315/pysmdev/pysmdev_libclocale.h Examining data/libsmdev-20190315/pysmdev/pysmdev.h Examining data/libsmdev-20190315/pysmdev/pysmdev_integer.h Examining data/libsmdev-20190315/pysmdev/pysmdev_handle.c Examining data/libsmdev-20190315/pysmdev/pysmdev_metadata.c Examining data/libsmdev-20190315/pysmdev/pysmdev_metadata.h Examining data/libsmdev-20190315/pysmdev/pysmdev.c Examining data/libsmdev-20190315/pysmdev/pysmdev_unused.h Examining data/libsmdev-20190315/libcfile/libcfile_file.c Examining data/libsmdev-20190315/libcfile/libcfile_libclocale.h Examining data/libsmdev-20190315/libcfile/libcfile_support.c Examining data/libsmdev-20190315/libcfile/libcfile_support.h Examining data/libsmdev-20190315/libcfile/libcfile_error.c Examining data/libsmdev-20190315/libcfile/libcfile_libcerror.h Examining data/libsmdev-20190315/libcfile/libcfile_unused.h Examining data/libsmdev-20190315/libcfile/libcfile_types.h Examining data/libsmdev-20190315/libcfile/libcfile_extern.h Examining data/libsmdev-20190315/libcfile/libcfile_notify.h Examining data/libsmdev-20190315/libcfile/libcfile_definitions.h Examining data/libsmdev-20190315/libcfile/libcfile_file.h Examining data/libsmdev-20190315/libcfile/libcfile_error.h Examining data/libsmdev-20190315/libcfile/libcfile_system_string.c Examining data/libsmdev-20190315/libcfile/libcfile_system_string.h Examining data/libsmdev-20190315/libcfile/libcfile_libcnotify.h Examining data/libsmdev-20190315/libcfile/libcfile_libuna.h Examining data/libsmdev-20190315/libcfile/libcfile_notify.c Examining data/libsmdev-20190315/libcthreads/libcthreads_thread_pool.h Examining data/libsmdev-20190315/libcthreads/libcthreads_thread_pool.c Examining data/libsmdev-20190315/libcthreads/libcthreads_repeating_thread.c Examining data/libsmdev-20190315/libcthreads/libcthreads_error.c Examining data/libsmdev-20190315/libcthreads/libcthreads_unused.h Examining data/libsmdev-20190315/libcthreads/libcthreads_condition.h Examining data/libsmdev-20190315/libcthreads/libcthreads_definitions.h Examining data/libsmdev-20190315/libcthreads/libcthreads_thread.h Examining data/libsmdev-20190315/libcthreads/libcthreads_repeating_thread.h Examining data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c Examining data/libsmdev-20190315/libcthreads/libcthreads_mutex.h Examining data/libsmdev-20190315/libcthreads/libcthreads_support.h Examining data/libsmdev-20190315/libcthreads/libcthreads_thread.c Examining data/libsmdev-20190315/libcthreads/libcthreads_mutex.c Examining data/libsmdev-20190315/libcthreads/libcthreads_types.h Examining data/libsmdev-20190315/libcthreads/libcthreads_lock.h Examining data/libsmdev-20190315/libcthreads/libcthreads_extern.h Examining data/libsmdev-20190315/libcthreads/libcthreads_error.h Examining data/libsmdev-20190315/libcthreads/libcthreads_queue.c Examining data/libsmdev-20190315/libcthreads/libcthreads_condition.c Examining data/libsmdev-20190315/libcthreads/libcthreads_thread_attributes.c Examining data/libsmdev-20190315/libcthreads/libcthreads_libcerror.h Examining data/libsmdev-20190315/libcthreads/libcthreads_lock.c Examining data/libsmdev-20190315/libcthreads/libcthreads_support.c Examining data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.h Examining data/libsmdev-20190315/libcthreads/libcthreads_thread_attributes.h Examining data/libsmdev-20190315/libcthreads/libcthreads_queue.h Examining data/libsmdev-20190315/libuna/libuna_url_stream.c Examining data/libsmdev-20190315/libuna/libuna_support.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_5.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_2.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1253.c Examining data/libsmdev-20190315/libuna/libuna_codepage_koi8_u.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1252.c Examining data/libsmdev-20190315/libuna/libuna_utf32_stream.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1257.h Examining data/libsmdev-20190315/libuna/libuna_utf32_string.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_874.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1251.h Examining data/libsmdev-20190315/libuna/libuna_libcerror.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_949.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_6.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1256.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_6.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_874.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1251.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1256.c Examining data/libsmdev-20190315/libuna/libuna_base16_stream.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_2.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1257.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1254.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1255.c Examining data/libsmdev-20190315/libuna/libuna_unused.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1253.h Examining data/libsmdev-20190315/libuna/libuna_unicode_character.h Examining data/libsmdev-20190315/libuna/libuna_byte_stream.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_3.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_15.h Examining data/libsmdev-20190315/libuna/libuna_utf32_string.h Examining data/libsmdev-20190315/libuna/libuna_codepage_koi8_r.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_936.h Examining data/libsmdev-20190315/libuna/libuna_base64_stream.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_950.c Examining data/libsmdev-20190315/libuna/libuna_utf8_string.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_936.c Examining data/libsmdev-20190315/libuna/libuna_unicode_character.c Examining data/libsmdev-20190315/libuna/libuna_utf8_string.c Examining data/libsmdev-20190315/libuna/libuna_base32_stream.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_950.h Examining data/libsmdev-20190315/libuna/libuna_error.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_932.h Examining data/libsmdev-20190315/libuna/libuna_utf8_stream.c Examining data/libsmdev-20190315/libuna/libuna_codepage_koi8_r.h Examining data/libsmdev-20190315/libuna/libuna_base16_stream.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1250.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_16.h Examining data/libsmdev-20190315/libuna/libuna_utf16_stream.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_10.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_932.c Examining data/libsmdev-20190315/libuna/libuna_utf8_stream.h Examining data/libsmdev-20190315/libuna/libuna_url_stream.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_949.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_8.c Examining data/libsmdev-20190315/libuna/libuna_types.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1252.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1250.c Examining data/libsmdev-20190315/libuna/libuna_utf16_string.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_5.h Examining data/libsmdev-20190315/libuna/libuna_extern.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_4.h Examining data/libsmdev-20190315/libuna/libuna_byte_stream.h Examining data/libsmdev-20190315/libuna/libuna_utf16_string.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_4.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_10.c Examining data/libsmdev-20190315/libuna/libuna_utf7_stream.h Examining data/libsmdev-20190315/libuna/libuna_base32_stream.h Examining data/libsmdev-20190315/libuna/libuna_utf16_stream.c Examining data/libsmdev-20190315/libuna/libuna_utf7_stream.c Examining data/libsmdev-20190315/libuna/libuna_support.h Examining data/libsmdev-20190315/libuna/libuna_utf32_stream.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_3.c Examining data/libsmdev-20190315/libuna/libuna_definitions.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1255.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_14.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_13.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_8.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_9.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1254.c Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1258.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_15.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_7.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_9.h Examining data/libsmdev-20190315/libuna/libuna_codepage_windows_1258.h Examining data/libsmdev-20190315/libuna/libuna_base64_stream.c Examining data/libsmdev-20190315/libuna/libuna_error.c Examining data/libsmdev-20190315/libuna/libuna_codepage_koi8_u.c Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_13.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_7.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_14.h Examining data/libsmdev-20190315/libuna/libuna_codepage_iso_8859_16.c Examining data/libsmdev-20190315/libcerror/libcerror_system.c Examining data/libsmdev-20190315/libcerror/libcerror_error.c Examining data/libsmdev-20190315/libcerror/libcerror_extern.h Examining data/libsmdev-20190315/libcerror/libcerror_error.h Examining data/libsmdev-20190315/libcerror/libcerror_support.h Examining data/libsmdev-20190315/libcerror/libcerror_types.h Examining data/libsmdev-20190315/libcerror/libcerror_definitions.h Examining data/libsmdev-20190315/libcerror/libcerror_unused.h Examining data/libsmdev-20190315/libcerror/libcerror_support.c Examining data/libsmdev-20190315/libcerror/libcerror_system.h Examining data/libsmdev-20190315/libcnotify/libcnotify_libcerror.h Examining data/libsmdev-20190315/libcnotify/libcnotify_unused.h Examining data/libsmdev-20190315/libcnotify/libcnotify_support.h Examining data/libsmdev-20190315/libcnotify/libcnotify_support.c Examining data/libsmdev-20190315/libcnotify/libcnotify_print.c Examining data/libsmdev-20190315/libcnotify/libcnotify_verbose.c Examining data/libsmdev-20190315/libcnotify/libcnotify_stream.h Examining data/libsmdev-20190315/libcnotify/libcnotify_extern.h Examining data/libsmdev-20190315/libcnotify/libcnotify_stream.c Examining data/libsmdev-20190315/libcnotify/libcnotify_print.h Examining data/libsmdev-20190315/libcnotify/libcnotify_verbose.h Examining data/libsmdev-20190315/libcnotify/libcnotify_definitions.h Examining data/libsmdev-20190315/libcdata/libcdata_array.c Examining data/libsmdev-20190315/libcdata/libcdata_btree_node.c Examining data/libsmdev-20190315/libcdata/libcdata_tree_node.c Examining data/libsmdev-20190315/libcdata/libcdata_libcthreads.h Examining data/libsmdev-20190315/libcdata/libcdata_range_list_value.h Examining data/libsmdev-20190315/libcdata/libcdata_unused.h Examining data/libsmdev-20190315/libcdata/libcdata_range_list.h Examining data/libsmdev-20190315/libcdata/libcdata_range_list.c Examining data/libsmdev-20190315/libcdata/libcdata_extern.h Examining data/libsmdev-20190315/libcdata/libcdata_support.c Examining data/libsmdev-20190315/libcdata/libcdata_list_element.h Examining data/libsmdev-20190315/libcdata/libcdata_btree_values_list.c Examining data/libsmdev-20190315/libcdata/libcdata_range_list_value.c Examining data/libsmdev-20190315/libcdata/libcdata_libcerror.h Examining data/libsmdev-20190315/libcdata/libcdata_error.c Examining data/libsmdev-20190315/libcdata/libcdata_error.h Examining data/libsmdev-20190315/libcdata/libcdata_support.h Examining data/libsmdev-20190315/libcdata/libcdata_btree_node.h Examining data/libsmdev-20190315/libcdata/libcdata_list.c Examining data/libsmdev-20190315/libcdata/libcdata_tree_node.h Examining data/libsmdev-20190315/libcdata/libcdata_list.h Examining data/libsmdev-20190315/libcdata/libcdata_types.h Examining data/libsmdev-20190315/libcdata/libcdata_list_element.c Examining data/libsmdev-20190315/libcdata/libcdata_btree_values_list.h Examining data/libsmdev-20190315/libcdata/libcdata_array.h Examining data/libsmdev-20190315/libcdata/libcdata_btree.h Examining data/libsmdev-20190315/libcdata/libcdata_definitions.h Examining data/libsmdev-20190315/libcdata/libcdata_btree.c FINAL RESULTS: data/libsmdev-20190315/common/file_stream.h:139:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf data/libsmdev-20190315/common/file_stream.h:143:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf( stream, format, __VA_ARGS__ ) data/libsmdev-20190315/common/narrow_string.h:148:2: [4] (format) snprintf: 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. snprintf data/libsmdev-20190315/common/narrow_string.h:152:2: [4] (format) snprintf: 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. snprintf( target, size, __VA_ARGS__ ) data/libsmdev-20190315/common/narrow_string.h:159:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf data/libsmdev-20190315/common/narrow_string.h:163:2: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. sscanf( string, format, __VA_ARGS__ ) data/libsmdev-20190315/common/narrow_string.h:174:2: [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. vsnprintf data/libsmdev-20190315/common/narrow_string.h:178:2: [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. vsnprintf( string, size, format, __VA_ARGS__ ) data/libsmdev-20190315/common/system_string.h:37:25: [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. #error Unsupported wide system character size data/libsmdev-20190315/common/wide_string.h:151:2: [4] (format) swprintf: Potential format string problem (CWE-134). Make format string constant. swprintf( target, size, __VA_ARGS__ ) data/libsmdev-20190315/common/wide_string.h:166:2: [4] (format) vswprintf: Potential format string problem (CWE-134). Make format string constant. vswprintf( string, size, format, __VA_ARGS__ ) data/libsmdev-20190315/include/libsmdev/types.h:94:16: [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. #error Missing system type definitions (sys/types.h) data/libsmdev-20190315/libcerror/libcerror_error.c:526:17: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. print_count = fprintf( data/libsmdev-20190315/libcerror/libcerror_error.c:681:18: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. print_count = fprintf( data/libsmdev-20190315/libcerror/libcerror_system.c:338:32: [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. #error Missing error to string system function data/libsmdev-20190315/libcerror/libcerror_system.c:91:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcerror/libcerror_system.c:144:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:113:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:302:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:796:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:1537:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:1597:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:2511:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:2802:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:3161:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:3471:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_file.c:4170:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_support.c:127:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_support.c:323:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_support.c:636:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libcfile/libcfile_support.c:828:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libclocale/libclocale_locale.c:59:19: [3] (misc) LoadLibrary: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. library_handle = LoadLibrary( data/libsmdev-20190315/libclocale/libclocale_locale.c:339: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. locale = getenv( data/libsmdev-20190315/libclocale/libclocale_locale.c:345: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. locale = getenv( data/libsmdev-20190315/libclocale/libclocale_locale.c:351: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. locale = getenv( data/libsmdev-20190315/libcthreads/libcthreads_condition.c:119:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_condition.c:377:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_condition.c:497:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_condition.c:622:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_condition.c:650:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_lock.c:107:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_lock.c:268:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_mutex.c:114:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_mutex.c:294:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:118:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:121:2: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:346:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:349:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:472:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.c:570:2: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection( data/libsmdev-20190315/smdevtools/smdevtools_getopt.h:40:2: [3] (buffer) getopt: 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. getopt( argument_count, argument_values, options_string ) data/libsmdev-20190315/tests/smdev_test_getopt.h:40:2: [3] (buffer) getopt: 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. getopt( argument_count, argument_values, options_string ) data/libsmdev-20190315/common/file_stream.h:62:2: [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). fopen( filename, mode ) data/libsmdev-20190315/common/memory.h:109:2: [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( (void *) destination, (void *) source, count ) data/libsmdev-20190315/common/narrow_string.h:100:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. (char *) memcpy( (void *) destination, (void *) source, size ) data/libsmdev-20190315/libcfile/libcfile_file.c:715:30: [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). internal_file->descriptor = open( data/libsmdev-20190315/libcfile/libcfile_file.c:769: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). #error Missing file open function data/libsmdev-20190315/libcfile/libcfile_file.c:1257:30: [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). internal_file->descriptor = open( data/libsmdev-20190315/libcfile/libcfile_file.c:1322: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). #error Missing file open wide function data/libsmdev-20190315/libsmdev/libsmdev_scsi.c:901: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 buffer[ 128 ]; data/libsmdev-20190315/pysmdev/pysmdev_error.c:69: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 error_string[ PYSMDEV_ERROR_STRING_SIZE ]; data/libsmdev-20190315/pysmdev/pysmdev_error.c:209: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 error_string[ PYSMDEV_ERROR_STRING_SIZE ]; data/libsmdev-20190315/pysmdev/pysmdev_error.c:339: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 error_string[ PYSMDEV_ERROR_STRING_SIZE ]; data/libsmdev-20190315/pysmdev/pysmdev_error.c:340: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 exception_string[ PYSMDEV_ERROR_STRING_SIZE ]; data/libsmdev-20190315/tests/smdev_test_handle.c:420: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 narrow_source[ 256 ]; data/libsmdev-20190315/tests/smdev_test_handle.c:541:2: [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 wide_source[ 256 ]; data/libsmdev-20190315/tests/smdev_test_memory.c:83:7: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. void *memcpy( data/libsmdev-20190315/common/narrow_string.h:59:2: [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( string ) data/libsmdev-20190315/common/narrow_string.h:104:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( destination, source, size ) data/libsmdev-20190315/common/wide_string.h:60:2: [1] (buffer) wcslen: 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). wcslen( string ) data/libsmdev-20190315/common/wide_string.h:101:2: [1] (buffer) wcsncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). wcsncpy( destination, source, size ) data/libsmdev-20190315/libcfile/libcfile_file.c:2280:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_count = read( data/libsmdev-20190315/libcfile/libcfile_file.c:2344:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_count = read( data/libsmdev-20190315/libcfile/libcfile_file.c:2402:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read_count = read( data/libsmdev-20190315/libcfile/libcfile_file.c:2446:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #error Missing file read function data/libsmdev-20190315/libcthreads/libcthreads_read_write_lock.h:78:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #error Missing read/write lock type ANALYSIS SUMMARY: Hits = 76 Lines analyzed = 130292 in approximately 3.44 seconds (37866 lines/second) Physical Source Lines of Code (SLOC) = 104165 Hits@level = [0] 94 [1] 9 [2] 15 [3] 37 [4] 15 [5] 0 Hits@level+ = [0+] 170 [1+] 76 [2+] 67 [3+] 52 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 1.63203 [1+] 0.729612 [2+] 0.64321 [3+] 0.499208 [4+] 0.144002 [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.