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/xapian-omega-1.4.15/expand.cc
Examining data/xapian-omega-1.4.15/commonhelp.h
Examining data/xapian-omega-1.4.15/omindex-list.cc
Examining data/xapian-omega-1.4.15/csvesctest.cc
Examining data/xapian-omega-1.4.15/hashterm.cc
Examining data/xapian-omega-1.4.15/freemem.h
Examining data/xapian-omega-1.4.15/namedents.h
Examining data/xapian-omega-1.4.15/configfile.h
Examining data/xapian-omega-1.4.15/msxmlparse.h
Examining data/xapian-omega-1.4.15/query.cc
Examining data/xapian-omega-1.4.15/mimemap.h
Examining data/xapian-omega-1.4.15/strcasecmp.h
Examining data/xapian-omega-1.4.15/transform.cc
Examining data/xapian-omega-1.4.15/xpsxmlparse.h
Examining data/xapian-omega-1.4.15/xpsxmlparse.cc
Examining data/xapian-omega-1.4.15/unixperm.h
Examining data/xapian-omega-1.4.15/runfilter.h
Examining data/xapian-omega-1.4.15/loadfile.cc
Examining data/xapian-omega-1.4.15/svgparse.cc
Examining data/xapian-omega-1.4.15/urlencode.h
Examining data/xapian-omega-1.4.15/omega.h
Examining data/xapian-omega-1.4.15/opendocparse.cc
Examining data/xapian-omega-1.4.15/datevalue.cc
Examining data/xapian-omega-1.4.15/utf8convert.cc
Examining data/xapian-omega-1.4.15/datetime.h
Examining data/xapian-omega-1.4.15/htmlparse.h
Examining data/xapian-omega-1.4.15/utf8truncate.cc
Examining data/xapian-omega-1.4.15/xmlparse.cc
Examining data/xapian-omega-1.4.15/utf8converttest.cc
Examining data/xapian-omega-1.4.15/loadfile.h
Examining data/xapian-omega-1.4.15/omindex.cc
Examining data/xapian-omega-1.4.15/atomparsetest.cc
Examining data/xapian-omega-1.4.15/cdb_hash.cc
Examining data/xapian-omega-1.4.15/metaxmlparse.cc
Examining data/xapian-omega-1.4.15/xmlparse.h
Examining data/xapian-omega-1.4.15/cdb_int.h
Examining data/xapian-omega-1.4.15/fields.h
Examining data/xapian-omega-1.4.15/utf8convert.h
Examining data/xapian-omega-1.4.15/jsonescape.cc
Examining data/xapian-omega-1.4.15/utils.cc
Examining data/xapian-omega-1.4.15/htmlparse.cc
Examining data/xapian-omega-1.4.15/sort.h
Examining data/xapian-omega-1.4.15/diritor.h
Examining data/xapian-omega-1.4.15/jsonescape.h
Examining data/xapian-omega-1.4.15/datetime.cc
Examining data/xapian-omega-1.4.15/csvescape.h
Examining data/xapian-omega-1.4.15/tmpdir.cc
Examining data/xapian-omega-1.4.15/date.h
Examining data/xapian-omega-1.4.15/metaxmlparse.h
Examining data/xapian-omega-1.4.15/xlsxparse.h
Examining data/xapian-omega-1.4.15/weight.h
Examining data/xapian-omega-1.4.15/runfilter.cc
Examining data/xapian-omega-1.4.15/values.h
Examining data/xapian-omega-1.4.15/cgiparam.h
Examining data/xapian-omega-1.4.15/opendocparse.h
Examining data/xapian-omega-1.4.15/svgparse.h
Examining data/xapian-omega-1.4.15/portability/strptime.cc
Examining data/xapian-omega-1.4.15/portability/mkdtemp.cc
Examining data/xapian-omega-1.4.15/portability/mkdtemp.h
Examining data/xapian-omega-1.4.15/portability/strptime.h
Examining data/xapian-omega-1.4.15/xlsxparse.cc
Examining data/xapian-omega-1.4.15/tmpdir.h
Examining data/xapian-omega-1.4.15/md5.cc
Examining data/xapian-omega-1.4.15/atomparse.h
Examining data/xapian-omega-1.4.15/freemem.cc
Examining data/xapian-omega-1.4.15/expand.h
Examining data/xapian-omega-1.4.15/omega.cc
Examining data/xapian-omega-1.4.15/commonhelp.cc
Examining data/xapian-omega-1.4.15/htmlparsetest.cc
Examining data/xapian-omega-1.4.15/sample.h
Examining data/xapian-omega-1.4.15/failed.h
Examining data/xapian-omega-1.4.15/csvescape.cc
Examining data/xapian-omega-1.4.15/timegm.h
Examining data/xapian-omega-1.4.15/utils.h
Examining data/xapian-omega-1.4.15/jsonesctest.cc
Examining data/xapian-omega-1.4.15/hashterm.h
Examining data/xapian-omega-1.4.15/msxmlparse.cc
Examining data/xapian-omega-1.4.15/md5wrap.cc
Examining data/xapian-omega-1.4.15/index_file.h
Examining data/xapian-omega-1.4.15/diritor.cc
Examining data/xapian-omega-1.4.15/myhtmlparse.h
Examining data/xapian-omega-1.4.15/configfile.cc
Examining data/xapian-omega-1.4.15/mime.h
Examining data/xapian-omega-1.4.15/transform.h
Examining data/xapian-omega-1.4.15/index_file.cc
Examining data/xapian-omega-1.4.15/myhtmlparse.cc
Examining data/xapian-omega-1.4.15/cdb_init.cc
Examining data/xapian-omega-1.4.15/cgiparam.cc
Examining data/xapian-omega-1.4.15/weight.cc
Examining data/xapian-omega-1.4.15/urlencode.cc
Examining data/xapian-omega-1.4.15/my-html-tok.h
Examining data/xapian-omega-1.4.15/timegm.cc
Examining data/xapian-omega-1.4.15/utf8truncate.h
Examining data/xapian-omega-1.4.15/scriptindex.cc
Examining data/xapian-omega-1.4.15/common/gnu_getopt.h
Examining data/xapian-omega-1.4.15/common/safe.cc
Examining data/xapian-omega-1.4.15/common/stringutils.h
Examining data/xapian-omega-1.4.15/common/safedirent.h
Examining data/xapian-omega-1.4.15/common/safeunistd.h
Examining data/xapian-omega-1.4.15/common/noreturn.h
Examining data/xapian-omega-1.4.15/common/safesysselect.h
Examining data/xapian-omega-1.4.15/common/safewinsock2.h
Examining data/xapian-omega-1.4.15/common/safesyswait.h
Examining data/xapian-omega-1.4.15/common/str.h
Examining data/xapian-omega-1.4.15/common/parseint.h
Examining data/xapian-omega-1.4.15/common/msvc_dirent.h
Examining data/xapian-omega-1.4.15/common/str.cc
Examining data/xapian-omega-1.4.15/common/omassert.h
Examining data/xapian-omega-1.4.15/common/keyword.cc
Examining data/xapian-omega-1.4.15/common/append_filename_arg.h
Examining data/xapian-omega-1.4.15/common/keyword.h
Examining data/xapian-omega-1.4.15/common/safefcntl.h
Examining data/xapian-omega-1.4.15/common/getopt.cc
Examining data/xapian-omega-1.4.15/common/overflow.h
Examining data/xapian-omega-1.4.15/common/safewindows.h
Examining data/xapian-omega-1.4.15/common/setenv.h
Examining data/xapian-omega-1.4.15/common/msvc_dirent.cc
Examining data/xapian-omega-1.4.15/common/safesysstat.h
Examining data/xapian-omega-1.4.15/common/realtime.h
Examining data/xapian-omega-1.4.15/cdb_unpack.cc
Examining data/xapian-omega-1.4.15/pkglibbindir.cc
Examining data/xapian-omega-1.4.15/query.h
Examining data/xapian-omega-1.4.15/urlenctest.cc
Examining data/xapian-omega-1.4.15/sample.cc
Examining data/xapian-omega-1.4.15/cdb.h
Examining data/xapian-omega-1.4.15/pkglibbindir.h
Examining data/xapian-omega-1.4.15/urldecode.h
Examining data/xapian-omega-1.4.15/mime.cc
Examining data/xapian-omega-1.4.15/datevalue.h
Examining data/xapian-omega-1.4.15/md5test.cc
Examining data/xapian-omega-1.4.15/cdb_find.cc
Examining data/xapian-omega-1.4.15/date.cc
Examining data/xapian-omega-1.4.15/md5.h
Examining data/xapian-omega-1.4.15/sort.cc
Examining data/xapian-omega-1.4.15/atomparse.cc
Examining data/xapian-omega-1.4.15/md5wrap.h

FINAL RESULTS:

data/xapian-omega-1.4.15/common/getopt.cc:40:12:  [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.
using std::fprintf;
data/xapian-omega-1.4.15/common/msvc_dirent.cc:62:13:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
            strcat(strcpy(dir->name, name), all);
data/xapian-omega-1.4.15/common/msvc_dirent.cc:62:20:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
            strcat(strcpy(dir->name, name), all);
data/xapian-omega-1.4.15/common/str.cc:137:19:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    size_t size = sprintf(buf, fmt, value);
data/xapian-omega-1.4.15/query.cc:93:11:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
    res = vsprintf(str, format, ap);
data/xapian-omega-1.4.15/runfilter.cc:56:10:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
# define popen _popen
data/xapian-omega-1.4.15/runfilter.cc:318:6:  [4] (shell) execl:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	    execl("/bin/sh", "/bin/sh", "-c", cmd.c_str(), (void*)NULL);
data/xapian-omega-1.4.15/runfilter.cc:374:2:  [4] (shell) execvp:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
	execvp(argv[0], const_cast<char **>(&argv[0]));
data/xapian-omega-1.4.15/runfilter.cc:459:17:  [4] (shell) popen:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    FILE * fh = popen(cmd.c_str(), "r");
data/xapian-omega-1.4.15/utils.cc:47:5:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
    sprintf(buf, (FMT), val);\
data/xapian-omega-1.4.15/cgiparam.cc:136: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.
    content_length = getenv("CONTENT_LENGTH");
data/xapian-omega-1.4.15/cgiparam.cc:148: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 *q_str = getenv("QUERY_STRING");
data/xapian-omega-1.4.15/common/getopt.cc:167:12:  [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.
using std::getenv;
data/xapian-omega-1.4.15/common/getopt.cc:260:21:  [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.
  posixly_correct = getenv ("POSIXLY_CORRECT");
data/xapian-omega-1.4.15/common/gnu_getopt.h:43:12:  [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.
    return getopt(argc_, argv_, shortopts_);
data/xapian-omega-1.4.15/common/gnu_getopt.h:49:12:  [3] (buffer) getopt_long:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    return getopt_long(argc_, argv_, shortopts_, longopts_, optind_);
data/xapian-omega-1.4.15/configfile.cc:121:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    const char * cfile = getenv(configfile_envvar);
data/xapian-omega-1.4.15/omega.cc:151:27:  [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 * method = getenv("REQUEST_METHOD");
data/xapian-omega-1.4.15/pkglibbindir.cc:37: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.
	const char * p = getenv("XAPIAN_OMEGA_PKGLIBBINDIR");
data/xapian-omega-1.4.15/query.cc:635:29:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char * remote_user = getenv("REMOTE_USER");
data/xapian-omega-1.4.15/query.cc:1489:15:  [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 *env = getenv(args[0].c_str());
data/xapian-omega-1.4.15/query.cc:2586: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.
	const char * p = getenv("SERVER_PROTOCOL");
data/xapian-omega-1.4.15/tmpdir.cc:48: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.
	const char * p = getenv("TMPDIR");
data/xapian-omega-1.4.15/cdb.h:19:36:  [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 cdb_unpack(const unsigned char buf[4]);
data/xapian-omega-1.4.15/cdb.h:20:38:  [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.
void cdb_pack(unsigned num, unsigned char buf[4]);
data/xapian-omega-1.4.15/cdb.h:86: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 cdb_buf[4096];		/* write buffer */
data/xapian-omega-1.4.15/cdb_init.cc:170: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(buf, data, len);
data/xapian-omega-1.4.15/cdb_unpack.cc:13:27:  [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.
cdb_unpack(const unsigned char buf[4])
data/xapian-omega-1.4.15/cgiparam.cc:138:30:  [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).
    if (content_length) cl = atoi(content_length);
data/xapian-omega-1.4.15/common/safefcntl.h:35:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
inline int open(const char *filename, int64_t flags, ...) {
data/xapian-omega-1.4.15/common/safefcntl.h:48:38:  [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).
#elif defined __cplusplus && defined open
data/xapian-omega-1.4.15/common/safefcntl.h:57:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return open(filename, flags, mode);
data/xapian-omega-1.4.15/common/safefcntl.h:61:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return open(filename, flags);
data/xapian-omega-1.4.15/common/safefcntl.h:64: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).
#undef open
data/xapian-omega-1.4.15/common/safefcntl.h:66:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
inline int open(const char *filename, int flags, mode_t mode) {
data/xapian-omega-1.4.15/common/safefcntl.h:70:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
inline int open(const char *filename, int flags) {
data/xapian-omega-1.4.15/common/str.cc:43: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[(sizeof(T) * 5 + 1) / 2];
data/xapian-omega-1.4.15/common/str.cc:70: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[(sizeof(unsigned_type) * 5 + 1) / 2 + 1];
data/xapian-omega-1.4.15/common/str.cc:129: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[128];
data/xapian-omega-1.4.15/configfile.cc: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 line[1024];
data/xapian-omega-1.4.15/date.cc:68: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[10];
data/xapian-omega-1.4.15/date.cc:193:16:  [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).
	time_t secs = atoi(date_span.c_str()) * (24 * 60 * 60);
data/xapian-omega-1.4.15/datevalue.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 buf[15];
data/xapian-omega-1.4.15/datevalue.cc:227:16:  [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).
	time_t span = atoi(date_span.c_str()) * (24 * 60 * 60) - 1;
data/xapian-omega-1.4.15/diritor.cc:107:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fd = open(path.c_str(), mode);
data/xapian-omega-1.4.15/diritor.cc:111: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).
	fd = open(path.c_str(), mode);
data/xapian-omega-1.4.15/diritor.cc:253:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char e[3];
data/xapian-omega-1.4.15/diritor.h:260:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[8192];
data/xapian-omega-1.4.15/htmlparse.cc:139: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 seq[4];
data/xapian-omega-1.4.15/index_file.cc:342:15:  [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).
		    pages = atoi(s.c_str());
data/xapian-omega-1.4.15/index_file.cc:790:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	    if (tmpfile.empty()) {
data/xapian-omega-1.4.15/index_file.cc:800:36:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	    append_filename_argument(cmd, tmpfile);
data/xapian-omega-1.4.15/index_file.cc:804:33:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		append_filename_argument(cmd, tmpfile);
data/xapian-omega-1.4.15/index_file.cc:810:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile.c_str());
data/xapian-omega-1.4.15/index_file.cc:813:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile.c_str());
data/xapian-omega-1.4.15/index_file.cc:817:20:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		get_pdf_metainfo(tmpfile, author, title, keywords, topic,
data/xapian-omega-1.4.15/index_file.cc:820:10:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		unlink(tmpfile.c_str());
data/xapian-omega-1.4.15/index_file.cc:823:13:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	    unlink(tmpfile.c_str());
data/xapian-omega-1.4.15/jsonescape.cc:38:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char json_tab['"' + 1] = {
data/xapian-omega-1.4.15/jsonescape.cc:68:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[7];
data/xapian-omega-1.4.15/jsonescape.cc:69: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(buf, "\\u00%02x", ch);
data/xapian-omega-1.4.15/jsonescape.cc:75:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[2] = {'\\', char(ch)};
data/xapian-omega-1.4.15/loadfile.cc:40: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 blk[4096];
data/xapian-omega-1.4.15/loadfile.cc:63: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(file_name.c_str(), mode);
data/xapian-omega-1.4.15/loadfile.cc:67: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).
	fd = open(file_name.c_str(), mode);
data/xapian-omega-1.4.15/loadfile.cc:111: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 blk[4096];
data/xapian-omega-1.4.15/md5.cc:101: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(p, buf, len);
data/xapian-omega-1.4.15/md5.cc:104: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(p, buf, t);
data/xapian-omega-1.4.15/md5.cc:113: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(ctx->in, buf, 64);
data/xapian-omega-1.4.15/md5.cc:122:5:  [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(ctx->in, buf, len);
data/xapian-omega-1.4.15/md5.cc:129:24:  [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.
void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
data/xapian-omega-1.4.15/md5.cc:166:5:  [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(digest, ctx->buf, 16);
data/xapian-omega-1.4.15/md5.h:44:24:  [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.
void MD5Final(unsigned char digest[16], struct MD5Context *context);
data/xapian-omega-1.4.15/md5test.cc:50:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buf[16];
data/xapian-omega-1.4.15/md5test.cc:51:6:  [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(buf, "%02x", static_cast<unsigned char>(md5[i]));
data/xapian-omega-1.4.15/md5wrap.cc:40: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 blk[4096];
data/xapian-omega-1.4.15/md5wrap.cc:61: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 blk[16];
data/xapian-omega-1.4.15/omega.cc:185:50:  [2] (integer) atol:
  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).
    if (val != cgi_params.end()) hits_per_page = atol(val->second.c_str());
data/xapian-omega-1.4.15/omega.cc:210:24:  [2] (integer) atol:
  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).
	Xapian::docid docid = atol(v.c_str());
data/xapian-omega-1.4.15/omega.cc:371:29:  [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).
	    Xapian::valueno slot = atoi(i->first.c_str() +
data/xapian-omega-1.4.15/omega.cc:381:29:  [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).
	    Xapian::valueno slot = atoi(i->first.c_str() +
data/xapian-omega-1.4.15/omega.cc:391:29:  [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).
	    Xapian::valueno slot = atoi(i->first.c_str() +
data/xapian-omega-1.4.15/omega.cc:458:14:  [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).
	threshold = atoi(val->second.c_str());
data/xapian-omega-1.4.15/omega.cc:468:21:  [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).
	    collapse_key = atoi(v.c_str());
data/xapian-omega-1.4.15/omega.cc:563: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).
	if (val != cgi_params.end() && atoi(val->second.c_str()) != 0) {
data/xapian-omega-1.4.15/omega.cc:569: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).
	    sort_after = (atoi(val->second.c_str()) != 0);
data/xapian-omega-1.4.15/omega.cc:604:13:  [2] (integer) atol:
  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).
	min_hits = atol(val->second.c_str());
data/xapian-omega-1.4.15/omindex.cc:522:16:  [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 arg = atoi(optarg);
data/xapian-omega-1.4.15/portability/mkdtemp.cc:53:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	static char xtra[2] = { 'a', 'a' };
data/xapian-omega-1.4.15/query.cc:1427:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		    char buf[64] = "";
data/xapian-omega-1.4.15/query.cc:1536:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		    char buf[200];
data/xapian-omega-1.4.15/query.cc:1879:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(logfile.c_str(), O_CREAT|O_APPEND|O_WRONLY, 0644);
data/xapian-omega-1.4.15/query.cc:1898:12:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
		int fd = open(cdbfile.c_str(), O_RDONLY);
data/xapian-omega-1.4.15/query.cc:2144: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).
		    Xapian::docid id = atoi(args[0].substr(i, j - i).c_str());
data/xapian-omega-1.4.15/query.cc:2335:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		    char buf[64];
data/xapian-omega-1.4.15/query.cc:2665:15:  [2] (integer) atol:
  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).
	    topdoc = atol(val->second.c_str());
data/xapian-omega-1.4.15/query.cc:2678:18:  [2] (integer) atol:
  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).
	    long page = atol(val->second.c_str());
data/xapian-omega-1.4.15/query.cc:2692:24:  [2] (integer) atol:
  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).
	    raw_search = bool(atol(val->second.c_str()));
data/xapian-omega-1.4.15/query.cc:2705:21:  [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).
		Xapian::docid d = atoi(value.c_str() + j);
data/xapian-omega-1.4.15/runfilter.cc:237: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).
    devnull = open("/dev/null", O_WRONLY);
data/xapian-omega-1.4.15/runfilter.cc:427:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[4096];
data/xapian-omega-1.4.15/runfilter.cc:462:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[4096];
data/xapian-omega-1.4.15/runfilter.h:33:52:  [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::string str() const { if (msg) return msg; char buf[32]; std::sprintf(buf, "0x%08x", status); return buf; }
data/xapian-omega-1.4.15/runfilter.h:33:71:  [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.
    std::string str() const { if (msg) return msg; char buf[32]; std::sprintf(buf, "0x%08x", status); return buf; }
data/xapian-omega-1.4.15/scriptindex.cc:111:12:  [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).
	num_arg = atoi(string_arg.c_str());
data/xapian-omega-1.4.15/scriptindex.cc:531:13:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			weight = atoi(val.c_str());
data/xapian-omega-1.4.15/tmpdir.cc:53: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(dir_template, p, plen);
data/xapian-omega-1.4.15/tmpdir.cc:54: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(dir_template + plen, TMPDIR_LEAF, leaflen + 1);
data/xapian-omega-1.4.15/urldecode.h:213:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char url_chars[256] = {
data/xapian-omega-1.4.15/urlenctest.cc:82:11:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    const char * result[7];
data/xapian-omega-1.4.15/utf8convert.cc:54: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[1024];
data/xapian-omega-1.4.15/utils.cc:39: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[BUFSIZE];\
data/xapian-omega-1.4.15/utils.cc:45: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[BUFSIZE];\
data/xapian-omega-1.4.15/utils.cc:55:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    return atoi(s.c_str());
data/xapian-omega-1.4.15/utils.cc:67: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[11];
data/xapian-omega-1.4.15/utils.cc:77: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(buf, "%04d%02d%02d", y, m, d);
data/xapian-omega-1.4.15/values.h:56:10:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    std::memcpy(&v, s.data(), 4);
data/xapian-omega-1.4.15/xlsxparse.cc:126:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char buf[32];
data/xapian-omega-1.4.15/cdb_init.cc:65:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    ssize_t n = read(fd, (void*)p, size);
data/xapian-omega-1.4.15/cgiparam.cc:113:15:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    int ch = getchar();
data/xapian-omega-1.4.15/common/getopt.cc:161:12:  [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).
using std::strlen;
data/xapian-omega-1.4.15/common/getopt.cc:474:51:  [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 (unsigned(nameend - nextchar) == unsigned(strlen(p->name)))
data/xapian-omega-1.4.15/common/getopt.cc:501:16:  [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).
	  nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:533:17:  [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).
		  nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:549:17:  [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).
		  nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:554:16:  [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).
	  nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:665:53:  [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 (unsigned(nameend - nextchar) == unsigned(strlen(p->name)))
data/xapian-omega-1.4.15/common/getopt.cc:688:18:  [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).
	    nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:708:19:  [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).
		    nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:722:19:  [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).
		    nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/getopt.cc:726:18:  [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).
	    nextchar += strlen (nextchar);
data/xapian-omega-1.4.15/common/msvc_dirent.cc:55:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t base_length = strlen(name);
data/xapian-omega-1.4.15/common/msvc_dirent.cc:60:55:  [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).
           (dir->name = (char *) malloc(base_length + strlen(all) + 1)) != 0)
data/xapian-omega-1.4.15/common/stringutils.h:60:36:  [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 startswith(s, pfx, std::strlen(pfx));
data/xapian-omega-1.4.15/common/stringutils.h:84:34:  [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 endswith(s, sfx, std::strlen(sfx));
data/xapian-omega-1.4.15/commonhelp.cc:41:38:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    const size_t WRAP_AT = 79 - 22 - strlen(spaces);
data/xapian-omega-1.4.15/diritor.cc:252: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 (ext && strlen(++ext) == 3) {
data/xapian-omega-1.4.15/htmlparsetest.cc:99: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).
	size_t html_len = strlen(html_begin);
data/xapian-omega-1.4.15/loadfile.cc:42:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t c = read(fd, blk, sizeof(blk));
data/xapian-omega-1.4.15/loadfile.cc:112:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int c = read(fd, blk, min(n, sizeof(blk)));
data/xapian-omega-1.4.15/md5wrap.cc:43:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	int c = read(fd, blk, sizeof(blk));
data/xapian-omega-1.4.15/omindex.cc:542:37:  [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).
	    max_ext_len = max(max_ext_len, strlen(s + 1));
data/xapian-omega-1.4.15/runfilter.cc:428:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t res = read(fd, buf, sizeof(buf));
data/xapian-omega-1.4.15/tmpdir.cc:50:16:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t plen = strlen(p);
data/xapian-omega-1.4.15/urldecode.h:153:21:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    current = std::getchar();
data/xapian-omega-1.4.15/urldecode.h:159:21:  [1] (buffer) getchar:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    current = std::getchar();
data/xapian-omega-1.4.15/urlencode.h:44:30:  [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).
    url_encode_(res, p, std::strlen(p), "-._~");
data/xapian-omega-1.4.15/urlencode.h:58:30:  [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).
    url_encode_(res, p, std::strlen(p), "/-._~");

ANALYSIS SUMMARY:

Hits = 148
Lines analyzed = 21271 in approximately 0.58 seconds (36463 lines/second)
Physical Source Lines of Code (SLOC) = 14949
Hits@level = [0]  14 [1]  30 [2]  95 [3]  13 [4]  10 [5]   0
Hits@level+ = [0+] 162 [1+] 148 [2+] 118 [3+]  23 [4+]  10 [5+]   0
Hits/KSLOC@level+ = [0+] 10.8368 [1+] 9.90033 [2+] 7.8935 [3+] 1.53856 [4+] 0.668941 [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.