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/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.h
Examining data/spamprobe-1.4d/src/database/HashDataFile.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_cache.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_dbm.h
Examining data/spamprobe-1.4d/src/database/WordArray.cc
Examining data/spamprobe-1.4d/src/database/HashDataFile.h
Examining data/spamprobe-1.4d/src/database/CleanupManager.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_null.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDB.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_dbm.cc
Examining data/spamprobe-1.4d/src/database/Message.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_cache.cc
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_null.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.h
Examining data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc
Examining data/spamprobe-1.4d/src/database/WordArray.h
Examining data/spamprobe-1.4d/src/database/DatabaseConfig.cc
Examining data/spamprobe-1.4d/src/hdl/HdlParser.cc
Examining data/spamprobe-1.4d/src/hdl/HdlStandardStatementConstraint.cc
Examining data/spamprobe-1.4d/src/hdl/HdlStatementConstraint.h
Examining data/spamprobe-1.4d/src/hdl/HdlStatementConstraint.cc
Examining data/spamprobe-1.4d/src/hdl/HdlToken.cc
Examining data/spamprobe-1.4d/src/hdl/HdlRecursiveStatementConstraint.h
Examining data/spamprobe-1.4d/src/hdl/HdlError.cc
Examining data/spamprobe-1.4d/src/hdl/HdlStatement.cc
Examining data/spamprobe-1.4d/src/hdl/HdlStandardStatementConstraint.h
Examining data/spamprobe-1.4d/src/hdl/HdlPrinter.cc
Examining data/spamprobe-1.4d/src/hdl/HdlSyntaxChecker.cc
Examining data/spamprobe-1.4d/src/hdl/HdlArgumentConstraint.h
Examining data/spamprobe-1.4d/src/hdl/HdlArgumentConstraint.cc
Examining data/spamprobe-1.4d/src/hdl/HdlTokenizer.cc
Examining data/spamprobe-1.4d/src/includes/MailMessage.h
Examining data/spamprobe-1.4d/src/includes/AbstractTokenizer.h
Examining data/spamprobe-1.4d/src/includes/Token.h
Examining data/spamprobe-1.4d/src/includes/IstreamCharReader.h
Examining data/spamprobe-1.4d/src/includes/TempPtr.h
Examining data/spamprobe-1.4d/src/includes/HdlToken.h
Examining data/spamprobe-1.4d/src/includes/HdlError.h
Examining data/spamprobe-1.4d/src/includes/HdlTokenizer.h
Examining data/spamprobe-1.4d/src/includes/CleanupManager.h
Examining data/spamprobe-1.4d/src/includes/Message.h
Examining data/spamprobe-1.4d/src/includes/SimpleTokenizer.h
Examining data/spamprobe-1.4d/src/includes/Tokenizer.h
Examining data/spamprobe-1.4d/src/includes/UrlOnlyHtmlTokenizer.h
Examining data/spamprobe-1.4d/src/includes/AbstractCharReader.h
Examining data/spamprobe-1.4d/src/includes/AbstractMailMessageParser.h
Examining data/spamprobe-1.4d/src/includes/AbstractTokenReceiver.h
Examining data/spamprobe-1.4d/src/includes/MultiLineJoinedString.h
Examining data/spamprobe-1.4d/src/includes/MD5Digester.h
Examining data/spamprobe-1.4d/src/includes/InterruptedException.h
Examining data/spamprobe-1.4d/src/includes/WordData.h
Examining data/spamprobe-1.4d/src/includes/StringReader.h
Examining data/spamprobe-1.4d/src/includes/LockFile.h
Examining data/spamprobe-1.4d/src/includes/File.h
Examining data/spamprobe-1.4d/src/includes/AbstractMultiLineString.h
Examining data/spamprobe-1.4d/src/includes/LineReader.h
Examining data/spamprobe-1.4d/src/includes/Ptr.h
Examining data/spamprobe-1.4d/src/includes/HtmlTokenizer.h
Examining data/spamprobe-1.4d/src/includes/MultiLineString.h
Examining data/spamprobe-1.4d/src/includes/HdlParser.h
Examining data/spamprobe-1.4d/src/includes/LockFD.h
Examining data/spamprobe-1.4d/src/includes/AbstractMailMessageReader.h
Examining data/spamprobe-1.4d/src/includes/MessageHeader.h
Examining data/spamprobe-1.4d/src/includes/AutoTrainMailMessageReader.h
Examining data/spamprobe-1.4d/src/includes/ParserConfig.h
Examining data/spamprobe-1.4d/src/includes/MailMessageDigester.h
Examining data/spamprobe-1.4d/src/includes/SimpleMultiLineStringCharReader.h
Examining data/spamprobe-1.4d/src/includes/RegularExpression.h
Examining data/spamprobe-1.4d/src/includes/LRUCache.h
Examining data/spamprobe-1.4d/src/includes/TraditionalMailMessageParser.h
Examining data/spamprobe-1.4d/src/includes/TokenCollector.h
Examining data/spamprobe-1.4d/src/includes/HeaderPrefixList.h
Examining data/spamprobe-1.4d/src/includes/HdlStatement.h
Examining data/spamprobe-1.4d/src/includes/config.h
Examining data/spamprobe-1.4d/src/includes/Array.h
Examining data/spamprobe-1.4d/src/includes/MailMessageReaderFactory.h
Examining data/spamprobe-1.4d/src/includes/TokenFilteringTokenizer.h
Examining data/spamprobe-1.4d/src/includes/FrequencyDB.h
Examining data/spamprobe-1.4d/src/includes/HdlSyntaxChecker.h
Examining data/spamprobe-1.4d/src/includes/HdlPrinter.h
Examining data/spamprobe-1.4d/src/includes/DatabaseConfig.h
Examining data/spamprobe-1.4d/src/includes/MailMessageList.h
Examining data/spamprobe-1.4d/src/includes/MessageHeaderList.h
Examining data/spamprobe-1.4d/src/includes/Buffer.h
Examining data/spamprobe-1.4d/src/includes/hash.h
Examining data/spamprobe-1.4d/src/includes/MultiLineSubString.h
Examining data/spamprobe-1.4d/src/includes/util.h
Examining data/spamprobe-1.4d/src/includes/Ref.h
Examining data/spamprobe-1.4d/src/input/IstreamCharReader.cc
Examining data/spamprobe-1.4d/src/input/StringReader.cc
Examining data/spamprobe-1.4d/src/input/SimpleMultiLineStringCharReader.cc
Examining data/spamprobe-1.4d/src/input/LineReader.cc
Examining data/spamprobe-1.4d/src/utility/MD5Digester.cc
Examining data/spamprobe-1.4d/src/utility/MultiLineString.cc
Examining data/spamprobe-1.4d/src/utility/hash.c
Examining data/spamprobe-1.4d/src/utility/LockFD.cc
Examining data/spamprobe-1.4d/src/utility/util.cc
Examining data/spamprobe-1.4d/src/utility/RegularExpression.cc
Examining data/spamprobe-1.4d/src/utility/LockFile.cc
Examining data/spamprobe-1.4d/src/utility/MultiLineJoinedString.cc
Examining data/spamprobe-1.4d/src/utility/md5.h
Examining data/spamprobe-1.4d/src/utility/AbstractMultiLineString.cc
Examining data/spamprobe-1.4d/src/utility/md5.c
Examining data/spamprobe-1.4d/src/utility/MultiLineSubString.cc
Examining data/spamprobe-1.4d/src/utility/File.cc
Examining data/spamprobe-1.4d/src/parser/UrlOnlyHtmlTokenizer.cc
Examining data/spamprobe-1.4d/src/parser/SimpleTokenizer.cc
Examining data/spamprobe-1.4d/src/parser/GifParser.h
Examining data/spamprobe-1.4d/src/parser/MailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/HeaderParser.cc
Examining data/spamprobe-1.4d/src/parser/MimeDecoder.cc
Examining data/spamprobe-1.4d/src/parser/MessageHeader.cc
Examining data/spamprobe-1.4d/src/parser/StreamMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/TraditionalMailMessageParser.cc
Examining data/spamprobe-1.4d/src/parser/BodyParser.cc
Examining data/spamprobe-1.4d/src/parser/MaildirMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/MaildirMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/HeaderParser.h
Examining data/spamprobe-1.4d/src/parser/ImageParser.h
Examining data/spamprobe-1.4d/src/parser/MbxMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/MimeDecoder.h
Examining data/spamprobe-1.4d/src/parser/FileMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/JpegParser.h
Examining data/spamprobe-1.4d/src/parser/MBoxMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/PngParser.h
Examining data/spamprobe-1.4d/src/parser/MailMessage.cc
Examining data/spamprobe-1.4d/src/parser/MailMessageDigester.cc
Examining data/spamprobe-1.4d/src/parser/FileMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/AbstractLineMailMessageReader.h
Examining data/spamprobe-1.4d/src/parser/MailMessageReaderFactory.cc
Examining data/spamprobe-1.4d/src/parser/ParserConfig.cc
Examining data/spamprobe-1.4d/src/parser/Tokenizer.cc
Examining data/spamprobe-1.4d/src/parser/PhrasingTokenizer.cc
Examining data/spamprobe-1.4d/src/parser/HeaderPrefixList.cc
Examining data/spamprobe-1.4d/src/parser/JpegParser.cc
Examining data/spamprobe-1.4d/src/parser/ImageParser.cc
Examining data/spamprobe-1.4d/src/parser/TokenFilteringTokenizer.cc
Examining data/spamprobe-1.4d/src/parser/TokenCollector.cc
Examining data/spamprobe-1.4d/src/parser/StreamMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/BodyParser.h
Examining data/spamprobe-1.4d/src/parser/MessageHeaderList.cc
Examining data/spamprobe-1.4d/src/parser/PhrasingTokenizer.h
Examining data/spamprobe-1.4d/src/parser/MBoxMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/AutoTrainMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/HtmlTokenizer.cc
Examining data/spamprobe-1.4d/src/parser/MailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/MbxMailMessageReader.cc
Examining data/spamprobe-1.4d/src/parser/PngParser.cc
Examining data/spamprobe-1.4d/src/parser/GifParser.cc
Examining data/spamprobe-1.4d/src/spamprobe/AbstractFileCommand.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_remove.cc
Examining data/spamprobe-1.4d/src/spamprobe/FilterConfig.h
Examining data/spamprobe-1.4d/src/spamprobe/AutoPurger.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_auto_train.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_spam.cc
Examining data/spamprobe-1.4d/src/spamprobe/CommandConfig.cc
Examining data/spamprobe-1.4d/src/spamprobe/AbstractFileCommand.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_create_db.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_receive.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_import.h
Examining data/spamprobe-1.4d/src/spamprobe/SpamFilter.h
Examining data/spamprobe-1.4d/src/spamprobe/AutoPurger.cc
Examining data/spamprobe-1.4d/src/spamprobe/ConfigManager.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_print.cc
Examining data/spamprobe-1.4d/src/spamprobe/AbstractCommand.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_export.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_auto_train.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_tokenize.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_train_test.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_summarize.h
Examining data/spamprobe-1.4d/src/spamprobe/SimpleTokenSelector.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_cleanup.h
Examining data/spamprobe-1.4d/src/spamprobe/CommandConfig.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_dump.h
Examining data/spamprobe-1.4d/src/spamprobe/TokenSelector.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_spam.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_print.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_purge_terms.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_exec.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_create_config.cc
Examining data/spamprobe-1.4d/src/spamprobe/SimpleTokenSelector.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_remove.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_receive.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_create_config.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_help.h
Examining data/spamprobe-1.4d/src/spamprobe/AbstractCommand.h
Examining data/spamprobe-1.4d/src/spamprobe/SpamFilter.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_counts.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_tokenize.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_edit_term.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_counts.cc
Examining data/spamprobe-1.4d/src/spamprobe/AbstractMessageCommand.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_train_test.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_export.h
Examining data/spamprobe-1.4d/src/spamprobe/AbstractMessageCommand.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_purge.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_help.cc
Examining data/spamprobe-1.4d/src/spamprobe/TokenSelector.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_summarize.cc
Examining data/spamprobe-1.4d/src/spamprobe/ConfigManager.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_dump.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_create_db.h
Examining data/spamprobe-1.4d/src/spamprobe/Command_purge_terms.cc
Examining data/spamprobe-1.4d/src/spamprobe/FilterConfig.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_cleanup.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_edit_term.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_exec.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_import.cc
Examining data/spamprobe-1.4d/src/spamprobe/Command_purge.cc
Examining data/spamprobe-1.4d/src/spamprobe/spamprobe.cc

FINAL RESULTS:

data/spamprobe-1.4d/src/spamprobe/Command_exec.cc:93:12:  [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.
  int rc = system(command.c_str());
data/spamprobe-1.4d/src/parser/AutoTrainMailMessageReader.cc:143:35:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
  return (m_totalCount >= 0) && ((random() % m_totalCount) < m_spamCount);
data/spamprobe-1.4d/src/spamprobe/spamprobe.cc:615:19:  [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.
    while ((opt = getopt(argc, argv, "a:cC:d:D:f:hH:g:l:mMo:p:P:r:Rs:t:TvVw:xXY78")) != EOF) {
data/spamprobe-1.4d/src/utility/File.cc:187: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.
  char *home = getenv("HOME");
data/spamprobe-1.4d/src/database/DatabaseConfig.cc:112:22:  [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).
    target_size_mb = atoi(arg.substr(first_colon + 1, last_colon - first_colon - 1).c_str());
data/spamprobe-1.4d/src/database/DatabaseConfig.cc:133: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).
  return db->open(private_filename, read_only, FrequencyDBImpl::PRIVATE_DB_MODE) ? db.release() : 0;
data/spamprobe-1.4d/src/database/FrequencyDB.cc:101: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).
bool FrequencyDB::open(bool read_only)
data/spamprobe-1.4d/src/database/FrequencyDBImpl.h:47: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).
  virtual bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc:70:12:  [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 char buffer[4096];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc:112: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).
bool FrequencyDBImpl_bdb::open(const string &arg_filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc:159:17:  [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).
  ret = m_file->open(m_file, NULL, filename.c_str(), NULL, DB_BTREE, flags, create_mode);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc:161:17:  [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).
  ret = m_file->open(m_file, filename.c_str(), NULL, DB_BTREE, flags, create_mode);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.cc:195: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).
  ret = m_env->open(m_env, db_file.parent().getPath().c_str(), env_flags, create_mode);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_bdb.h:49:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_cache.cc:50:29:  [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).
bool FrequencyDBImpl_cache::open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_cache.cc:55: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).
  return m_db->open(filename, read_only, create_mode);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_cache.h:44:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dbm.cc:56: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).
bool FrequencyDBImpl_dbm::open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dbm.h:50:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.cc:54:28:  [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).
bool FrequencyDBImpl_dual::open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.cc:59:22:  [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 m_sharedDB->open(m_sharedFilename, true, SHARED_DB_MODE)
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.cc:60: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).
         && m_privateDB->open(filename, read_only, PRIVATE_DB_MODE);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_dual.h:44:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:87:28:  [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).
bool FrequencyDBImpl_hash::open(const string &arg_filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:100: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).
  if (!m_dataFile.open(db_file.getPath(), read_only, create_mode)) {
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:201: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 buffer[128];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:202:5:  [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.
    sprintf(buffer, "I0x%08x", key);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:295: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).
  temp_file.open(rehash_filename, false, m_dataFile.createMode());
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:360: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).
  if (!m_dataFile.open(live_filename, read_only, create_mode)) {
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.h:48:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_null.cc:43:28:  [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).
bool FrequencyDBImpl_null::open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_null.h:42:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:58:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buffer[4096];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:108: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(ptr, str.c_str(), len);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:113: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).
bool FrequencyDBImpl_pbl::open(const string &arg_filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:204:12:  [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 key[BUFFER_SIZE];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:243:12:  [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 key[BUFFER_SIZE];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.cc:262: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 key[BUFFER_SIZE];
data/spamprobe-1.4d/src/database/FrequencyDBImpl_pbl.h:49:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.cc:56:29:  [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).
bool FrequencyDBImpl_split::open(const string &filename,
data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.cc:64: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).
  if (!m_db->open(db_filename, read_only, create_mode)) {
data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.cc:71: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).
  if (!m_hash->open(db_filename, read_only, create_mode)) {
data/spamprobe-1.4d/src/database/FrequencyDBImpl_split.h:44:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/database/HashDataFile.cc:122:12:  [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 zeros[SIZE_MULTIPLE * WordArray::ENTRY_SIZE];
data/spamprobe-1.4d/src/database/HashDataFile.cc:130:20:  [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).
bool HashDataFile::open(const string &filename,
data/spamprobe-1.4d/src/database/HashDataFile.cc:189: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(filename.c_str(), flags, create_mode);
data/spamprobe-1.4d/src/database/HashDataFile.h:72:8:  [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).
  bool open(const string &filename,
data/spamprobe-1.4d/src/hdl/HdlTokenizer.cc:154:34:  [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).
    m_token = HdlToken::intToken(atoi(digits.c_str()), m_filename, m_lineNumber);
data/spamprobe-1.4d/src/includes/FrequencyDB.h:47:8:  [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).
  bool open(bool read_only);
data/spamprobe-1.4d/src/parser/FileMailMessageReader.cc:44:29:  [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 FileMailMessageReader::open(const string &path,
data/spamprobe-1.4d/src/parser/FileMailMessageReader.h:44:8:  [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 open(const string &path, bool ignore_from, bool ignore_content_length);
data/spamprobe-1.4d/src/parser/GifParser.cc:66: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(dst, parser->m_bytes.get() + parser->m_nextByteIndex, length);
data/spamprobe-1.4d/src/parser/HtmlTokenizer.cc:205:20:  [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).
    answer = (char)atoi(entity.c_str());
data/spamprobe-1.4d/src/parser/MailMessageReader.cc:60:31:  [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).
      content_length = max(0, atoi(regex.getMatch(1, buffer).c_str()) - CONTENT_LENGTH_PADDING);
data/spamprobe-1.4d/src/parser/MailMessageReaderFactory.cc:69: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).
    reader->open(file.getPath(), m_ignoreFrom, m_ignoreContentLength);
data/spamprobe-1.4d/src/parser/MaildirMailMessageReader.cc:72: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).
        tmp->open(child.getPath(), true, true);
data/spamprobe-1.4d/src/parser/MbxMailMessageReader.cc:73:22:  [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).
    m_recordLength = atoi(m_headerRegex.getMatch(1, matched).c_str());
data/spamprobe-1.4d/src/spamprobe/AbstractCommand.cc:42:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buffer[32];
data/spamprobe-1.4d/src/spamprobe/AbstractCommand.cc:43:3:  [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.
  sprintf(buffer, "%9.7f", score);
data/spamprobe-1.4d/src/spamprobe/AbstractCommand.cc:58: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).
  filter.open(isReadOnly());
data/spamprobe-1.4d/src/spamprobe/Command_cleanup.cc:62:22:  [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 junk_count = atoi(config.commandConfig()->arg(i).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_cleanup.cc:63: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).
    int max_age = atoi(config.commandConfig()->arg(i + 1).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_edit_term.cc:59:20:  [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 good_count = atoi(cmd_config->arg(1).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_edit_term.cc:60:20:  [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 spam_count = atoi(cmd_config->arg(2).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_import.cc:75:26:  [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 good_count = atoi(parts_expr.getMatch(1, match_buffer).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_import.cc:76:26:  [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 spam_count = atoi(parts_expr.getMatch(2, match_buffer).c_str());
data/spamprobe-1.4d/src/spamprobe/Command_import.cc:92:33:  [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).
          unsigned long flags = atoi(flags_str.c_str());
data/spamprobe-1.4d/src/spamprobe/Command_purge.cc:72:65:  [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 junk_count = config.commandConfig()->numArgs() == 0 ? 2 : atoi(config.commandConfig()->arg(0).c_str());
data/spamprobe-1.4d/src/spamprobe/SpamFilter.cc:82: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).
void SpamFilter::open(bool read_only)
data/spamprobe-1.4d/src/spamprobe/SpamFilter.cc:85: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).
  if (!m_db.open(read_only)) {
data/spamprobe-1.4d/src/spamprobe/SpamFilter.h:105:8:  [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 open(bool read_only);
data/spamprobe-1.4d/src/spamprobe/spamprobe.cc:398:11:  [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).
  value = atoi(arg);
data/spamprobe-1.4d/src/spamprobe/spamprobe.cc:452:17:  [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).
      s_filter->open(true);
data/spamprobe-1.4d/src/utility/LockFile.cc:57: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(m_file, open_flag, lock_mode);
data/spamprobe-1.4d/src/utility/md5.c:169: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(xbuf, data, 64);
data/spamprobe-1.4d/src/utility/md5.c:343: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(pms->buf + offset, p, copy);
data/spamprobe-1.4d/src/utility/md5.c:357: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(pms->buf, p, left);
data/spamprobe-1.4d/src/utility/util.cc:197:12:  [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 char buffer[32];
data/spamprobe-1.4d/src/utility/util.cc:198:5:  [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.
    sprintf(buffer, "%d", num);
data/spamprobe-1.4d/src/utility/util.cc:204:12:  [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 char buffer[128];
data/spamprobe-1.4d/src/utility/util.cc:205:5:  [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.
    sprintf(buffer, "%f", num);
data/spamprobe-1.4d/src/utility/util.cc:211:12:  [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 char buffer[32];
data/spamprobe-1.4d/src/utility/util.cc:212:5:  [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.
    sprintf(buffer, "%03d", num);
data/spamprobe-1.4d/src/database/FrequencyDBImpl_hash.cc:180:25:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    answer = m_dataFile.read(key, counts);
data/spamprobe-1.4d/src/database/HashDataFile.cc:306:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
bool HashDataFile::read(ulong_t key,
data/spamprobe-1.4d/src/database/HashDataFile.h:91:8:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  bool read(ulong_t key,
data/spamprobe-1.4d/src/includes/util.h:84:41:  [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).
    return strncmp(str.c_str(), prefix, strlen(prefix)) == 0;
data/spamprobe-1.4d/src/spamprobe/spamprobe.cc:618:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        if (strlen(optarg) != 1) {

ANALYSIS SUMMARY:

Hits = 88
Lines analyzed = 25672 in approximately 0.58 seconds (44098 lines/second)
Physical Source Lines of Code (SLOC) = 15719
Hits@level = [0]   1 [1]   5 [2]  79 [3]   3 [4]   1 [5]   0
Hits@level+ = [0+]  89 [1+]  88 [2+]  83 [3+]   4 [4+]   1 [5+]   0
Hits/KSLOC@level+ = [0+] 5.66194 [1+] 5.59832 [2+] 5.28023 [3+] 0.254469 [4+] 0.0636173 [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.