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/astroidmail-0.15/src/account_manager.cc
Examining data/astroidmail-0.15/src/actions/action.cc
Examining data/astroidmail-0.15/src/actions/action_manager.cc
Examining data/astroidmail-0.15/src/actions/cmdaction.cc
Examining data/astroidmail-0.15/src/actions/difftag_action.cc
Examining data/astroidmail-0.15/src/actions/onmessage.cc
Examining data/astroidmail-0.15/src/actions/tag_action.cc
Examining data/astroidmail-0.15/src/actions/toggle_action.cc
Examining data/astroidmail-0.15/src/astroid.cc
Examining data/astroidmail-0.15/src/chunk.cc
Examining data/astroidmail-0.15/src/command_bar.cc
Examining data/astroidmail-0.15/src/compose_message.cc
Examining data/astroidmail-0.15/src/crypto.cc
Examining data/astroidmail-0.15/src/db.cc
Examining data/astroidmail-0.15/src/main.cc
Examining data/astroidmail-0.15/src/main_window.cc
Examining data/astroidmail-0.15/src/message_thread.cc
Examining data/astroidmail-0.15/src/modes/edit_message.cc
Examining data/astroidmail-0.15/src/modes/editor/editor.cc
Examining data/astroidmail-0.15/src/modes/editor/external.cc
Examining data/astroidmail-0.15/src/modes/editor/plugin.cc
Examining data/astroidmail-0.15/src/modes/forward_message.cc
Examining data/astroidmail-0.15/src/modes/help_mode.cc
Examining data/astroidmail-0.15/src/modes/keybindings.cc
Examining data/astroidmail-0.15/src/modes/log_view.cc
Examining data/astroidmail-0.15/src/modes/mode.cc
Examining data/astroidmail-0.15/src/modes/paned_mode.cc
Examining data/astroidmail-0.15/src/modes/raw_message.cc
Examining data/astroidmail-0.15/src/modes/reply_message.cc
Examining data/astroidmail-0.15/src/modes/saved_searches.cc
Examining data/astroidmail-0.15/src/modes/thread_index/query_loader.cc
Examining data/astroidmail-0.15/src/modes/thread_index/thread_index.cc
Examining data/astroidmail-0.15/src/modes/thread_index/thread_index_list_cell_renderer.cc
Examining data/astroidmail-0.15/src/modes/thread_index/thread_index_list_view.cc
Examining data/astroidmail-0.15/src/modes/thread_view/page_client.cc
Examining data/astroidmail-0.15/src/modes/thread_view/theme.cc
Examining data/astroidmail-0.15/src/modes/thread_view/thread_view.cc
Examining data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc
Examining data/astroidmail-0.15/src/modes/thread_view/webextension/dom_utils.cc
Examining data/astroidmail-0.15/src/modes/thread_view/webextension/tvextension.cc
Examining data/astroidmail-0.15/src/plugin/astroid_activatable.c
Examining data/astroidmail-0.15/src/plugin/astroid_activatable.h
Examining data/astroidmail-0.15/src/plugin/gir_main.c
Examining data/astroidmail-0.15/src/plugin/manager.cc
Examining data/astroidmail-0.15/src/plugin/thread_index_activatable.c
Examining data/astroidmail-0.15/src/plugin/thread_index_activatable.h
Examining data/astroidmail-0.15/src/plugin/thread_view_activatable.c
Examining data/astroidmail-0.15/src/plugin/thread_view_activatable.h
Examining data/astroidmail-0.15/src/poll.cc
Examining data/astroidmail-0.15/src/utils/address.cc
Examining data/astroidmail-0.15/src/utils/cmd.cc
Examining data/astroidmail-0.15/src/utils/compiler.h
Examining data/astroidmail-0.15/src/utils/date_utils.cc
Examining data/astroidmail-0.15/src/utils/gmime/gmime-compat.cc
Examining data/astroidmail-0.15/src/utils/gmime/gmime-compat.h
Examining data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c
Examining data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.h
Examining data/astroidmail-0.15/src/utils/gmime/gtrie.c
Examining data/astroidmail-0.15/src/utils/gmime/gtrie.h
Examining data/astroidmail-0.15/src/utils/gmime/url-scanner.c
Examining data/astroidmail-0.15/src/utils/gmime/url-scanner.h
Examining data/astroidmail-0.15/src/utils/gravatar.cc
Examining data/astroidmail-0.15/src/utils/resource.cc
Examining data/astroidmail-0.15/src/utils/ustring_utils.cc
Examining data/astroidmail-0.15/src/utils/utils.cc
Examining data/astroidmail-0.15/src/utils/vector_utils.cc
Examining data/astroidmail-0.15/src/config.cc
Examining data/astroidmail-0.15/tests/test_address.cc
Examining data/astroidmail-0.15/tests/test_bad_content_id.cc
Examining data/astroidmail-0.15/tests/test_convert_error.cc
Examining data/astroidmail-0.15/tests/test_crypto.cc
Examining data/astroidmail-0.15/tests/test_dates.cc
Examining data/astroidmail-0.15/tests/test_generic.cc
Examining data/astroidmail-0.15/tests/test_gmime_version.cc
Examining data/astroidmail-0.15/tests/test_keybindings.cc
Examining data/astroidmail-0.15/tests/test_markdown.cc
Examining data/astroidmail-0.15/tests/test_mime_message.cc
Examining data/astroidmail-0.15/tests/test_no_newline_msg.cc
Examining data/astroidmail-0.15/tests/test_non_existant_file.cc
Examining data/astroidmail-0.15/tests/test_notmuch.cc
Examining data/astroidmail-0.15/tests/test_notmuch_standalone.cc
Examining data/astroidmail-0.15/tests/test_open_db.cc
Examining data/astroidmail-0.15/tests/test_quote_html.cc
Examining data/astroidmail-0.15/tests/test_theme.cc
Examining data/astroidmail-0.15/tests/test_composed_message.cc

FINAL RESULTS:

data/astroidmail-0.15/src/astroid.cc:94:48:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
          keywords::facility = logging::sinks::syslog::user,
data/astroidmail-0.15/src/astroid.cc:95:48:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
          keywords::use_impl = logging::sinks::syslog::native,
data/astroidmail-0.15/src/astroid.cc:101:25:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
        logging::sinks::syslog::direct_severity_mapping< int >("Severity"));
data/astroidmail-0.15/src/chunk.cc:165:76:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
            auto c = refptr<Chunk>(new Chunk(k, true, crypt->verify_tried, crypt));
data/astroidmail-0.15/src/chunk.cc:185:61:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
          auto c = refptr<Chunk>(new Chunk(mo, false, true, crypt));
data/astroidmail-0.15/src/chunk.cc:199:71:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
          auto c = refptr<Chunk>(new Chunk(mo, isencrypted, issigned, crypt));
data/astroidmail-0.15/src/modes/thread_view/page_client.cc:589:32:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        refptr<Crypto> cr = c->crypt;
data/astroidmail-0.15/src/modes/thread_view/page_client.cc:701:32:  [4] (crypto) crypt:
  The crypt functions use a poor one-way hashing algorithm; since they only
  accept passwords of 8 characters or fewer and only a two-byte salt, they
  are excessively vulnerable to dictionary attacks given today's faster
  computing equipment (CWE-327). Use a different algorithm, such as SHA-256,
  with a larger, non-repeating salt.
        refptr<Crypto> cr = c->crypt;
data/astroidmail-0.15/src/modes/thread_view/webextension/tvextension.cc:107:46:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
        keywords::facility = logging::sinks::syslog::user,
data/astroidmail-0.15/src/modes/thread_view/webextension/tvextension.cc:108:46:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
        keywords::use_impl = logging::sinks::syslog::native,
data/astroidmail-0.15/src/modes/thread_view/webextension/tvextension.cc:114:23:  [4] (format) syslog:
  If syslog's format strings can be influenced by an attacker, they can be
  exploited (CWE-134). Use a constant format string for syslog.
      logging::sinks::syslog::direct_severity_mapping< int >("Severity"));
data/astroidmail-0.15/tests/test_crypto.cc:201:5:  [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.
    system ("notmuch new; notmuch search \"*\"");
data/astroidmail-0.15/tests/test_crypto.cc:286:5:  [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.
    system ("notmuch new");
data/astroidmail-0.15/tests/test_non_existant_file.cc:43:5:  [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.
    system ("notmuch new");
data/astroidmail-0.15/tests/test_non_existant_file.cc:91:5:  [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.
    system ("notmuch new");
data/astroidmail-0.15/tests/test_notmuch_standalone.cc:118:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf (qry_s, "thread:%s", thread_id.c_str ());
data/astroidmail-0.15/src/config.cc:58:23:  [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.
      char * home_c = getenv ("HOME");
data/astroidmail-0.15/src/config.cc:73:28:  [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.
      char * config_home = getenv ("XDG_CONFIG_HOME");
data/astroidmail-0.15/src/config.cc:88:19:  [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.
    char * data = getenv ("XDG_DATA_HOME");
data/astroidmail-0.15/src/config.cc:96:20:  [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.
    char * cache = getenv ("XDG_CACHE_HOME");
data/astroidmail-0.15/src/config.cc:104: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.
    char * runtime = getenv ("XDG_RUNTIME_HOME");
data/astroidmail-0.15/src/config.cc:161:20:  [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.
    char* nm_env = getenv("NOTMUCH_CONFIG");
data/astroidmail-0.15/src/config.cc:318:11:  [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.
      if (getenv ("ASTROID_BUILD_DIR")) {
data/astroidmail-0.15/src/config.cc:369:33:  [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.
    char * notmuch_config_env = getenv ("NOTMUCH_CONFIG");
data/astroidmail-0.15/src/db.cc:44: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 * home = getenv ("HOME");
data/astroidmail-0.15/src/plugin/manager.cc:54:18:  [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.
      char * g = getenv ("GI_TYPELIB_PATH");
data/astroidmail-0.15/src/utils/resource.cc:22:19:  [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.
    char * adir = getenv ("ASTROID_DIR");
data/astroidmail-0.15/src/utils/utils.cc:78: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 * home = getenv ("HOME");
data/astroidmail-0.15/tests/test_notmuch_standalone.cc:23:20:  [3] (buffer) realpath:
  This function does not protect against buffer overflows, and some
  implementations can overflow internally (CWE-120/CWE-785!). Ensure that the
  destination buffer is at least of size MAXPATHLEN, andto protect against
  implementation problems, the input argument should also be checked to
  ensure it is no larger than MAXPATHLEN.
  char * path_db = realpath ("./tests/mail/test_mail", NULL);
data/astroidmail-0.15/src/chunk.cc:378: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 buffer[4097];
data/astroidmail-0.15/src/chunk.cc:564:15:  [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).
  void Chunk::open () {
data/astroidmail-0.15/src/command_bar.cc:647: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.
    unsigned char cv[3] = { (unsigned char) (canvas_color.get_red_u ()   * 255 / 65535),
data/astroidmail-0.15/src/compose_message.cc:698:14:  [2] (tmpfile) mkstemp:
  Potential for temporary file vulnerability in some circumstances. Some
  older Unix-like systems create temp files with permission to write by all
  by default, so be sure to set the umask to override this. Also, some older
  Unix systems might fail to use O_EXCL when opening the file, so make sure
  that O_EXCL is used by the library (CWE-377).
    int fd = mkstemp(temporaryFilePath);
data/astroidmail-0.15/src/compose_message.cc:716:26:  [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).
    FILE * MessageFile = fopen(fname.c_str(), "w");
data/astroidmail-0.15/src/main_window.cc:539: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 * args[2] = { shell, NULL };
data/astroidmail-0.15/src/main_window.cc:540: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 * envs[1] = { NULL };
data/astroidmail-0.15/src/message_thread.cc:863:28:  [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).
      FILE * MessageFile = fopen (tofname.c_str(), "w");
data/astroidmail-0.15/src/modes/edit_message.cc:147: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 _hostname[1024];
data/astroidmail-0.15/src/modes/edit_message.cc:151: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 _domainname[1024];
data/astroidmail-0.15/src/modes/edit_message.cc:696:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.open (tmpfile_path.c_str(), std::fstream::out);
data/astroidmail-0.15/src/modes/edit_message.cc:696:13:  [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).
    tmpfile.open (tmpfile_path.c_str(), std::fstream::out);
data/astroidmail-0.15/src/modes/edit_message.cc:697:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << "From: " << from << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:698:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << "To: " << to << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:699:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << "Cc: " << cc << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:701:7:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
      tmpfile << "Bcc: " << bcc << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:703:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << "Subject: " << subject << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:704:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << endl;
data/astroidmail-0.15/src/modes/edit_message.cc:705:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << body.raw();
data/astroidmail-0.15/src/modes/edit_message.cc:707:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.close ();
data/astroidmail-0.15/src/modes/edit_message.cc:1257:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.open (tmpfile_path.c_str(), std::fstream::out);
data/astroidmail-0.15/src/modes/edit_message.cc:1257:13:  [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).
    tmpfile.open (tmpfile_path.c_str(), std::fstream::out);
data/astroidmail-0.15/src/modes/edit_message.cc:1259:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if (tmpfile.fail()) {
data/astroidmail-0.15/src/modes/edit_message.cc:1264:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.close ();
data/astroidmail-0.15/src/modes/thread_index/thread_index_list_cell_renderer.cc:360: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.
      unsigned char cv[3] = { (unsigned char) bg.get_red (),
data/astroidmail-0.15/src/modes/thread_index/thread_index_list_cell_renderer.cc:420: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 buf[BUFLEN];
data/astroidmail-0.15/src/modes/thread_view/thread_view.cc:1802:24:  [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).
                    c->open ();
data/astroidmail-0.15/src/modes/thread_view/thread_view.cc:1830: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).
                      c->open ();
data/astroidmail-0.15/src/utils/gmime/gmime-compat.cc:35: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 zstr[50];
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:354:16:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
					outptr += sprintf (outptr, "&#%u;", u);
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:402: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.
          char bq[33];
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:434: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 font[25];
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:476:6:  [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 (outptr, start, matchlen);
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:481:6:  [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 (outptr, start, matchlen);
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:104:17:  [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 unsigned char url_scanner_table[256] = {
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:143: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).
	char open;
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:159: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).
		if (c == url_braces[i].open)
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:173:36:  [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).
			if (in[so - 1] == url_braces[i].open)
data/astroidmail-0.15/src/utils/utils.cc:109:82:  [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.
  std::pair<Gdk::RGBA, Gdk::RGBA> Utils::get_tag_color_rgba (ustring t, unsigned char cv[3])
data/astroidmail-0.15/src/utils/vector_utils.cc:68: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.
      unsigned char canvascolor[3]
data/astroidmail-0.15/tests/test_convert_error.cc:67:18:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    std::fstream tmpfile (name, std::fstream::out);
data/astroidmail-0.15/tests/test_convert_error.cc:69:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << "From: test@test.no" << endl;
data/astroidmail-0.15/tests/test_convert_error.cc:72:28:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    BOOST_CHECK_NO_THROW ( tmpfile << body.raw() );
data/astroidmail-0.15/tests/test_convert_error.cc:74:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile << endl;
data/astroidmail-0.15/tests/test_convert_error.cc:75:5:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    tmpfile.close ();
data/astroidmail-0.15/tests/test_notmuch_standalone.cc:117: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 qry_s[256];
data/astroidmail-0.15/src/compose_message.cc:787:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      refptr<Gio::FileInputStream> istr = fle->read ();
data/astroidmail-0.15/src/config.cc:163:29:  [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).
      nm_cfg.assign(nm_env, strlen(nm_env));
data/astroidmail-0.15/src/message_thread.cc:663: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).
          if (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/message_thread.cc:669: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).
          if (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/message_thread.cc:675: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).
          if (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/message_thread.cc:685:24:  [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 (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/message_thread.cc:691:24:  [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 (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/message_thread.cc:697:24:  [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 (c != NULL && strlen(c)) {
data/astroidmail-0.15/src/modes/thread_view/page_client.cc:132:16:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t p = umask (0077);
data/astroidmail-0.15/src/modes/thread_view/page_client.cc:140:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask (p);
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:144:63:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    s = istream->read_all ((char *) &msg_sz, sizeof (msg_sz), read, reader_cancel);
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:146:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!s || read != sizeof (msg_sz)) {
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:155:54:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    s = istream->read_all ((char*) &mt, sizeof (mt), read, reader_cancel);
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:157:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!s || read != sizeof (mt)) {
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:164:53:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
      s = istream->read_all (buffer.data(), msg_sz, read, reader_cancel);
data/astroidmail-0.15/src/modes/thread_view/webextension/ae_protocol.cc:170:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!s || read != msg_sz) {
data/astroidmail-0.15/src/utils/gmime/gmime-filter-html-bq.c:470:20:  [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).
					buflen = 20 + strlen (match.prefix) + matchlen + matchlen;
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:305:11:  [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).
	inptr += strlen (match->pattern);
data/astroidmail-0.15/src/utils/gmime/url-scanner.c:343:11:  [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).
	inptr += strlen (match->pattern);

ANALYSIS SUMMARY:

Hits = 94
Lines analyzed = 28139 in approximately 0.68 seconds (41302 lines/second)
Physical Source Lines of Code (SLOC) = 19661
Hits@level = [0]   9 [1]  19 [2]  46 [3]  13 [4]  16 [5]   0
Hits@level+ = [0+] 103 [1+]  94 [2+]  75 [3+]  29 [4+]  16 [5+]   0
Hits/KSLOC@level+ = [0+] 5.2388 [1+] 4.78104 [2+] 3.81466 [3+] 1.475 [4+] 0.813794 [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.