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-core-1.4.17/languages/swedish.h
Examining data/xapian-core-1.4.17/languages/porter.h
Examining data/xapian-core-1.4.17/languages/romanian.h
Examining data/xapian-core-1.4.17/languages/earlyenglish.cc
Examining data/xapian-core-1.4.17/languages/hungarian.cc
Examining data/xapian-core-1.4.17/languages/steminternal.h
Examining data/xapian-core-1.4.17/languages/turkish.h
Examining data/xapian-core-1.4.17/languages/dutch.cc
Examining data/xapian-core-1.4.17/languages/french.h
Examining data/xapian-core-1.4.17/languages/earlyenglish.h
Examining data/xapian-core-1.4.17/languages/italian.h
Examining data/xapian-core-1.4.17/languages/lovins.cc
Examining data/xapian-core-1.4.17/languages/kraaij_pohlmann.cc
Examining data/xapian-core-1.4.17/languages/german2.cc
Examining data/xapian-core-1.4.17/languages/indonesian.h
Examining data/xapian-core-1.4.17/languages/english.cc
Examining data/xapian-core-1.4.17/languages/romanian.cc
Examining data/xapian-core-1.4.17/languages/german2.h
Examining data/xapian-core-1.4.17/languages/basque.h
Examining data/xapian-core-1.4.17/languages/kraaij_pohlmann.h
Examining data/xapian-core-1.4.17/languages/catalan.h
Examining data/xapian-core-1.4.17/languages/german.cc
Examining data/xapian-core-1.4.17/languages/allsnowballheaders.h
Examining data/xapian-core-1.4.17/languages/arabic.h
Examining data/xapian-core-1.4.17/languages/finnish.h
Examining data/xapian-core-1.4.17/languages/lithuanian.h
Examining data/xapian-core-1.4.17/languages/portuguese.h
Examining data/xapian-core-1.4.17/languages/indonesian.cc
Examining data/xapian-core-1.4.17/languages/norwegian.cc
Examining data/xapian-core-1.4.17/languages/dutch.h
Examining data/xapian-core-1.4.17/languages/irish.cc
Examining data/xapian-core-1.4.17/languages/italian.cc
Examining data/xapian-core-1.4.17/languages/russian.h
Examining data/xapian-core-1.4.17/languages/norwegian.h
Examining data/xapian-core-1.4.17/languages/tamil.h
Examining data/xapian-core-1.4.17/languages/arabic.cc
Examining data/xapian-core-1.4.17/languages/russian.cc
Examining data/xapian-core-1.4.17/languages/nepali.cc
Examining data/xapian-core-1.4.17/languages/hungarian.h
Examining data/xapian-core-1.4.17/languages/catalan.cc
Examining data/xapian-core-1.4.17/languages/french.cc
Examining data/xapian-core-1.4.17/languages/compiler/space.c
Examining data/xapian-core-1.4.17/languages/compiler/tokeniser.c
Examining data/xapian-core-1.4.17/languages/compiler/syswords.h
Examining data/xapian-core-1.4.17/languages/compiler/header.h
Examining data/xapian-core-1.4.17/languages/compiler/generator.c
Examining data/xapian-core-1.4.17/languages/compiler/syswords2.h
Examining data/xapian-core-1.4.17/languages/compiler/driver.c
Examining data/xapian-core-1.4.17/languages/compiler/analyser.c
Examining data/xapian-core-1.4.17/languages/porter.cc
Examining data/xapian-core-1.4.17/languages/danish.h
Examining data/xapian-core-1.4.17/languages/german.h
Examining data/xapian-core-1.4.17/languages/spanish.h
Examining data/xapian-core-1.4.17/languages/lovins.h
Examining data/xapian-core-1.4.17/languages/turkish.cc
Examining data/xapian-core-1.4.17/languages/steminternal.cc
Examining data/xapian-core-1.4.17/languages/spanish.cc
Examining data/xapian-core-1.4.17/languages/danish.cc
Examining data/xapian-core-1.4.17/languages/sbl-dispatch.h
Examining data/xapian-core-1.4.17/languages/basque.cc
Examining data/xapian-core-1.4.17/languages/stem.cc
Examining data/xapian-core-1.4.17/languages/portuguese.cc
Examining data/xapian-core-1.4.17/languages/swedish.cc
Examining data/xapian-core-1.4.17/languages/english.h
Examining data/xapian-core-1.4.17/languages/lithuanian.cc
Examining data/xapian-core-1.4.17/languages/irish.h
Examining data/xapian-core-1.4.17/languages/nepali.h
Examining data/xapian-core-1.4.17/languages/armenian.cc
Examining data/xapian-core-1.4.17/languages/armenian.h
Examining data/xapian-core-1.4.17/languages/finnish.cc
Examining data/xapian-core-1.4.17/languages/tamil.cc
Examining data/xapian-core-1.4.17/tests/perftest/freemem.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest_matchdecider.cc
Examining data/xapian-core-1.4.17/tests/perftest/perftest_matchdecider.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest_collated.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest_randomidx.cc
Examining data/xapian-core-1.4.17/tests/perftest/perftest.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest_all.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest_randomidx.h
Examining data/xapian-core-1.4.17/tests/perftest/runprocess.h
Examining data/xapian-core-1.4.17/tests/perftest/perftest.cc
Examining data/xapian-core-1.4.17/tests/perftest/freemem.cc
Examining data/xapian-core-1.4.17/tests/perftest/runprocess.cc
Examining data/xapian-core-1.4.17/tests/api_query.cc
Examining data/xapian-core-1.4.17/tests/unittest.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_multi.cc
Examining data/xapian-core-1.4.17/tests/harness/unixcmds.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager.cc
Examining data/xapian-core-1.4.17/tests/harness/cputimer.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_singlefile.h
Examining data/xapian-core-1.4.17/tests/harness/testrunner.cc
Examining data/xapian-core-1.4.17/tests/harness/fdtracker.cc
Examining data/xapian-core-1.4.17/tests/harness/fdtracker.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_glass.cc
Examining data/xapian-core-1.4.17/tests/harness/index_utils.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_chert.h
Examining data/xapian-core-1.4.17/tests/harness/scalability.cc
Examining data/xapian-core-1.4.17/tests/harness/unixcmds.h
Examining data/xapian-core-1.4.17/tests/harness/testmacros.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.h
Examining data/xapian-core-1.4.17/tests/harness/cputimer.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_inmemory.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_glass.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_multi.h
Examining data/xapian-core-1.4.17/tests/harness/testsuite.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remote.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_singlefile.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_inmemory.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc
Examining data/xapian-core-1.4.17/tests/harness/testutils.h
Examining data/xapian-core-1.4.17/tests/harness/testsuite.cc
Examining data/xapian-core-1.4.17/tests/harness/testrunner.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remote.cc
Examining data/xapian-core-1.4.17/tests/harness/utestsuite.cc
Examining data/xapian-core-1.4.17/tests/harness/index_utils.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc
Examining data/xapian-core-1.4.17/tests/harness/testutils.cc
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.h
Examining data/xapian-core-1.4.17/tests/harness/backendmanager_chert.cc
Examining data/xapian-core-1.4.17/tests/harness/scalability.h
Examining data/xapian-core-1.4.17/tests/api_replacedoc.cc
Examining data/xapian-core-1.4.17/tests/api_termgen.h
Examining data/xapian-core-1.4.17/tests/api_generated.h
Examining data/xapian-core-1.4.17/tests/api_qpbackend.h
Examining data/xapian-core-1.4.17/tests/api_stem.cc
Examining data/xapian-core-1.4.17/tests/api_collapse.h
Examining data/xapian-core-1.4.17/tests/api_scalability.cc
Examining data/xapian-core-1.4.17/tests/api_geospatial.h
Examining data/xapian-core-1.4.17/tests/api_matchspy.cc
Examining data/xapian-core-1.4.17/tests/api_replacedoc.h
Examining data/xapian-core-1.4.17/tests/api_wrdb.h
Examining data/xapian-core-1.4.17/tests/api_valuestats.h
Examining data/xapian-core-1.4.17/tests/zlib-vg.c
Examining data/xapian-core-1.4.17/tests/api_scalability.h
Examining data/xapian-core-1.4.17/tests/api_weight.cc
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest_queries.cc
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest_all.h
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest.h
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest.cc
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest_collated.h
Examining data/xapian-core-1.4.17/tests/soaktest/soaktest_queries.h
Examining data/xapian-core-1.4.17/tests/api_compact.h
Examining data/xapian-core-1.4.17/tests/api_replicate.h
Examining data/xapian-core-1.4.17/tests/api_all.h
Examining data/xapian-core-1.4.17/tests/api_opsynonym.h
Examining data/xapian-core-1.4.17/tests/api_postingsource.cc
Examining data/xapian-core-1.4.17/tests/api_queryparser.h
Examining data/xapian-core-1.4.17/tests/api_compact.cc
Examining data/xapian-core-1.4.17/tests/api_sorting.h
Examining data/xapian-core-1.4.17/tests/api_opvalue.cc
Examining data/xapian-core-1.4.17/tests/api_db.h
Examining data/xapian-core-1.4.17/tests/api_db.cc
Examining data/xapian-core-1.4.17/tests/api_postingsource.h
Examining data/xapian-core-1.4.17/tests/api_valuestats.cc
Examining data/xapian-core-1.4.17/tests/api_weight.h
Examining data/xapian-core-1.4.17/tests/api_metadata.cc
Examining data/xapian-core-1.4.17/tests/api_qpbackend.cc
Examining data/xapian-core-1.4.17/tests/api_backend.cc
Examining data/xapian-core-1.4.17/tests/api_transdb.cc
Examining data/xapian-core-1.4.17/tests/api_posdb.h
Examining data/xapian-core-1.4.17/tests/api_nodb.h
Examining data/xapian-core-1.4.17/tests/internaltest.cc
Examining data/xapian-core-1.4.17/tests/api_collapse.cc
Examining data/xapian-core-1.4.17/tests/api_snippets.h
Examining data/xapian-core-1.4.17/tests/api_serialise.h
Examining data/xapian-core-1.4.17/tests/api_collated.h
Examining data/xapian-core-1.4.17/tests/apitest.cc
Examining data/xapian-core-1.4.17/tests/api_none.h
Examining data/xapian-core-1.4.17/tests/api_opsynonym.cc
Examining data/xapian-core-1.4.17/tests/api_stem.h
Examining data/xapian-core-1.4.17/tests/api_percentages.h
Examining data/xapian-core-1.4.17/tests/api_replicate.cc
Examining data/xapian-core-1.4.17/tests/api_none.cc
Examining data/xapian-core-1.4.17/tests/api_percentages.cc
Examining data/xapian-core-1.4.17/tests/api_valuestream.h
Examining data/xapian-core-1.4.17/tests/api_compactold.cc
Examining data/xapian-core-1.4.17/tests/api_opvalue.h
Examining data/xapian-core-1.4.17/tests/api_backend.h
Examining data/xapian-core-1.4.17/tests/api_unicode.h
Examining data/xapian-core-1.4.17/tests/api_nodb.cc
Examining data/xapian-core-1.4.17/tests/dbcheck.h
Examining data/xapian-core-1.4.17/tests/api_metadata.h
Examining data/xapian-core-1.4.17/tests/api_spelling.cc
Examining data/xapian-core-1.4.17/tests/api_wrdb.cc
Examining data/xapian-core-1.4.17/tests/api_compactold.h
Examining data/xapian-core-1.4.17/tests/stemtest.cc
Examining data/xapian-core-1.4.17/tests/dbcheck.cc
Examining data/xapian-core-1.4.17/tests/api_valuestream.cc
Examining data/xapian-core-1.4.17/tests/api_transdb.h
Examining data/xapian-core-1.4.17/tests/api_snippets.cc
Examining data/xapian-core-1.4.17/tests/api_query.h
Examining data/xapian-core-1.4.17/tests/api_anydb.h
Examining data/xapian-core-1.4.17/tests/api_generated.cc
Examining data/xapian-core-1.4.17/tests/apitest.h
Examining data/xapian-core-1.4.17/tests/api_queryparser.cc
Examining data/xapian-core-1.4.17/tests/api_closedb.cc
Examining data/xapian-core-1.4.17/tests/api_closedb.h
Examining data/xapian-core-1.4.17/tests/api_spelling.h
Examining data/xapian-core-1.4.17/tests/api_sorting.cc
Examining data/xapian-core-1.4.17/tests/api_matchspy.h
Examining data/xapian-core-1.4.17/tests/api_geospatial.cc
Examining data/xapian-core-1.4.17/tests/api_posdb.cc
Examining data/xapian-core-1.4.17/tests/api_anydb.cc
Examining data/xapian-core-1.4.17/tests/api_serialise.cc
Examining data/xapian-core-1.4.17/tests/api_termgen.cc
Examining data/xapian-core-1.4.17/tests/api_unicode.cc
Examining data/xapian-core-1.4.17/expand/tradeweight.cc
Examining data/xapian-core-1.4.17/expand/ortermlist.cc
Examining data/xapian-core-1.4.17/expand/esetinternal.cc
Examining data/xapian-core-1.4.17/expand/ortermlist.h
Examining data/xapian-core-1.4.17/expand/bo1eweight.cc
Examining data/xapian-core-1.4.17/expand/esetinternal.h
Examining data/xapian-core-1.4.17/expand/expandweight.h
Examining data/xapian-core-1.4.17/expand/expandweight.cc
Examining data/xapian-core-1.4.17/weight/pl2weight.cc
Examining data/xapian-core-1.4.17/weight/boolweight.cc
Examining data/xapian-core-1.4.17/weight/inl2weight.cc
Examining data/xapian-core-1.4.17/weight/bm25weight.cc
Examining data/xapian-core-1.4.17/weight/bb2weight.cc
Examining data/xapian-core-1.4.17/weight/weightinternal.cc
Examining data/xapian-core-1.4.17/weight/lmweight.cc
Examining data/xapian-core-1.4.17/weight/dlhweight.cc
Examining data/xapian-core-1.4.17/weight/weightinternal.h
Examining data/xapian-core-1.4.17/weight/ineb2weight.cc
Examining data/xapian-core-1.4.17/weight/pl2plusweight.cc
Examining data/xapian-core-1.4.17/weight/bm25plusweight.cc
Examining data/xapian-core-1.4.17/weight/tradweight.cc
Examining data/xapian-core-1.4.17/weight/coordweight.cc
Examining data/xapian-core-1.4.17/weight/dphweight.cc
Examining data/xapian-core-1.4.17/weight/weight.cc
Examining data/xapian-core-1.4.17/weight/tfidfweight.cc
Examining data/xapian-core-1.4.17/weight/ifb2weight.cc
Examining data/xapian-core-1.4.17/api/documentterm.h
Examining data/xapian-core-1.4.17/api/termlist.cc
Examining data/xapian-core-1.4.17/api/valuerangeproc.cc
Examining data/xapian-core-1.4.17/api/valuesetmatchdecider.cc
Examining data/xapian-core-1.4.17/api/query.cc
Examining data/xapian-core-1.4.17/api/postingsource.cc
Examining data/xapian-core-1.4.17/api/roundestimate.h
Examining data/xapian-core-1.4.17/api/leafpostlist.h
Examining data/xapian-core-1.4.17/api/expanddecider.cc
Examining data/xapian-core-1.4.17/api/replication.cc
Examining data/xapian-core-1.4.17/api/errorhandler.cc
Examining data/xapian-core-1.4.17/api/vectortermlist.h
Examining data/xapian-core-1.4.17/api/postlist.h
Examining data/xapian-core-1.4.17/api/documentvaluelist.cc
Examining data/xapian-core-1.4.17/api/editdistance.h
Examining data/xapian-core-1.4.17/api/documentvaluelist.h
Examining data/xapian-core-1.4.17/api/smallvector.h
Examining data/xapian-core-1.4.17/api/postingiterator.cc
Examining data/xapian-core-1.4.17/api/omenquire.cc
Examining data/xapian-core-1.4.17/api/editdistance.cc
Examining data/xapian-core-1.4.17/api/emptypostlist.cc
Examining data/xapian-core-1.4.17/api/valueiterator.cc
Examining data/xapian-core-1.4.17/api/emptypostlist.h
Examining data/xapian-core-1.4.17/api/positioniterator.cc
Examining data/xapian-core-1.4.17/api/decvalwtsource.cc
Examining data/xapian-core-1.4.17/api/termiterator.cc
Examining data/xapian-core-1.4.17/api/replication.h
Examining data/xapian-core-1.4.17/api/constinfo.cc
Examining data/xapian-core-1.4.17/api/omdocument.cc
Examining data/xapian-core-1.4.17/api/error.cc
Examining data/xapian-core-1.4.17/api/maptermlist.h
Examining data/xapian-core-1.4.17/api/omdatabase.cc
Examining data/xapian-core-1.4.17/api/postlist.cc
Examining data/xapian-core-1.4.17/api/leafpostlist.cc
Examining data/xapian-core-1.4.17/api/sortable-serialise.cc
Examining data/xapian-core-1.4.17/api/keymaker.cc
Examining data/xapian-core-1.4.17/api/queryinternal.h
Examining data/xapian-core-1.4.17/api/omenquireinternal.h
Examining data/xapian-core-1.4.17/api/matchspy.cc
Examining data/xapian-core-1.4.17/api/termlist.h
Examining data/xapian-core-1.4.17/api/vectortermlist.cc
Examining data/xapian-core-1.4.17/api/queryinternal.cc
Examining data/xapian-core-1.4.17/api/queryvector.h
Examining data/xapian-core-1.4.17/api/registry.cc
Examining data/xapian-core-1.4.17/api/smallvector.cc
Examining data/xapian-core-1.4.17/api/compactor.cc
Examining data/xapian-core-1.4.17/unicode/description_append.h
Examining data/xapian-core-1.4.17/unicode/utf8itor.cc
Examining data/xapian-core-1.4.17/unicode/unicode-data.cc
Examining data/xapian-core-1.4.17/unicode/c_istab.h
Examining data/xapian-core-1.4.17/unicode/description_append.cc
Examining data/xapian-core-1.4.17/include/xapian/document.h
Examining data/xapian-core-1.4.17/include/xapian/eset.h
Examining data/xapian-core-1.4.17/include/xapian/errordispatch.h
Examining data/xapian-core-1.4.17/include/xapian/postingiterator.h
Examining data/xapian-core-1.4.17/include/xapian/keymaker.h
Examining data/xapian-core-1.4.17/include/xapian/termiterator.h
Examining data/xapian-core-1.4.17/include/xapian/database.h
Examining data/xapian-core-1.4.17/include/xapian/iterator.h
Examining data/xapian-core-1.4.17/include/xapian/visibility.h
Examining data/xapian-core-1.4.17/include/xapian/intrusive_ptr.h
Examining data/xapian-core-1.4.17/include/xapian/queryparser.h
Examining data/xapian-core-1.4.17/include/xapian/constinfo.h
Examining data/xapian-core-1.4.17/include/xapian/registry.h
Examining data/xapian-core-1.4.17/include/xapian/constants.h
Examining data/xapian-core-1.4.17/include/xapian/matchspy.h
Examining data/xapian-core-1.4.17/include/xapian/derefwrapper.h
Examining data/xapian-core-1.4.17/include/xapian/attributes.h
Examining data/xapian-core-1.4.17/include/xapian/version_h.cc
Examining data/xapian-core-1.4.17/include/xapian/mset.h
Examining data/xapian-core-1.4.17/include/xapian/weight.h
Examining data/xapian-core-1.4.17/include/xapian/enquire.h
Examining data/xapian-core-1.4.17/include/xapian/dbfactory.h
Examining data/xapian-core-1.4.17/include/xapian/unicode.h
Examining data/xapian-core-1.4.17/include/xapian/geospatial.h
Examining data/xapian-core-1.4.17/include/xapian/postingsource.h
Examining data/xapian-core-1.4.17/include/xapian/expanddecider.h
Examining data/xapian-core-1.4.17/include/xapian/stem.h
Examining data/xapian-core-1.4.17/include/xapian/error.h
Examining data/xapian-core-1.4.17/include/xapian/compactor.h
Examining data/xapian-core-1.4.17/include/xapian/valuesetmatchdecider.h
Examining data/xapian-core-1.4.17/include/xapian/errorhandler.h
Examining data/xapian-core-1.4.17/include/xapian/query.h
Examining data/xapian-core-1.4.17/include/xapian/positioniterator.h
Examining data/xapian-core-1.4.17/include/xapian/valueiterator.h
Examining data/xapian-core-1.4.17/include/xapian/deprecated.h
Examining data/xapian-core-1.4.17/include/xapian/termgenerator.h
Examining data/xapian-core-1.4.17/include/xapian/types.h
Examining data/xapian-core-1.4.17/include/xapian.h
Examining data/xapian-core-1.4.17/backends/document.h
Examining data/xapian-core-1.4.17/backends/prefix_compressed_strings.h
Examining data/xapian-core-1.4.17/backends/glass/glass_valuelist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_replicate_internal.h
Examining data/xapian-core-1.4.17/backends/glass/glass_termlisttable.h
Examining data/xapian-core-1.4.17/backends/glass/glass_version.h
Examining data/xapian-core-1.4.17/backends/glass/glass_dbcheck.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_freelist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_valuelist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_synonym.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_check.h
Examining data/xapian-core-1.4.17/backends/glass/glass_positionlist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_metadata.h
Examining data/xapian-core-1.4.17/backends/glass/glass_database.h
Examining data/xapian-core-1.4.17/backends/glass/glass_alldocspostlist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_freelist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_changes.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_metadata.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_version.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_positionlist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_cursor.h
Examining data/xapian-core-1.4.17/backends/glass/glass_defs.h
Examining data/xapian-core-1.4.17/backends/glass/glass_spelling.h
Examining data/xapian-core-1.4.17/backends/glass/glass_values.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_dbcheck.h
Examining data/xapian-core-1.4.17/backends/glass/glass_lazytable.h
Examining data/xapian-core-1.4.17/backends/glass/glass_table.h
Examining data/xapian-core-1.4.17/backends/glass/glass_synonym.h
Examining data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_check.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_document.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_spellingwordslist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_inverter.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_cursor.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_alltermslist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_docdata.h
Examining data/xapian-core-1.4.17/backends/glass/glass_values.h
Examining data/xapian-core-1.4.17/backends/glass/glass_spelling.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_spellingwordslist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_alltermslist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_termlisttable.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_termlist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_inverter.h
Examining data/xapian-core-1.4.17/backends/glass/glass_alldocspostlist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_postlist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_table.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_document.h
Examining data/xapian-core-1.4.17/backends/glass/glass_postlist.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_termlist.h
Examining data/xapian-core-1.4.17/backends/glass/glass_changes.h
Examining data/xapian-core-1.4.17/backends/glass/glass_compact.cc
Examining data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.h
Examining data/xapian-core-1.4.17/backends/glass/glass_database.cc
Examining data/xapian-core-1.4.17/backends/valuelist.h
Examining data/xapian-core-1.4.17/backends/valuestats.h
Examining data/xapian-core-1.4.17/backends/valuelist.cc
Examining data/xapian-core-1.4.17/backends/database.h
Examining data/xapian-core-1.4.17/backends/chert/chert_spelling.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_postlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_dbstats.h
Examining data/xapian-core-1.4.17/backends/chert/chert_dbcheck.h
Examining data/xapian-core-1.4.17/backends/chert/chert_valuelist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_valuelist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_document.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_termlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_alltermslist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_termlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_modifiedpostlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_btreebase.h
Examining data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_termlisttable.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_alltermslist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_termlisttable.h
Examining data/xapian-core-1.4.17/backends/chert/chert_cursor.h
Examining data/xapian-core-1.4.17/backends/chert/chert_alldocsmodifiedpostlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_synonym.h
Examining data/xapian-core-1.4.17/backends/chert/chert_modifiedpostlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_databasereplicator.h
Examining data/xapian-core-1.4.17/backends/chert/chert_replicate_internal.h
Examining data/xapian-core-1.4.17/backends/chert/chert_lazytable.h
Examining data/xapian-core-1.4.17/backends/chert/chert_spelling.h
Examining data/xapian-core-1.4.17/backends/chert/chert_document.h
Examining data/xapian-core-1.4.17/backends/chert/chert_values.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_postlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_record.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_spellingwordslist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_alldocspostlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_cursor.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_positionlist.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_synonym.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_version.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_spellingwordslist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_compact.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_alldocspostlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_version.h
Examining data/xapian-core-1.4.17/backends/chert/chert_metadata.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_check.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_positionlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_alldocsmodifiedpostlist.h
Examining data/xapian-core-1.4.17/backends/chert/chert_types.h
Examining data/xapian-core-1.4.17/backends/chert/chert_databasereplicator.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_values.h
Examining data/xapian-core-1.4.17/backends/chert/chert_dbcheck.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_record.h
Examining data/xapian-core-1.4.17/backends/chert/chert_database.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_table.h
Examining data/xapian-core-1.4.17/backends/chert/chert_check.h
Examining data/xapian-core-1.4.17/backends/chert/chert_dbstats.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_database.h
Examining data/xapian-core-1.4.17/backends/chert/chert_table.cc
Examining data/xapian-core-1.4.17/backends/chert/chert_metadata.h
Examining data/xapian-core-1.4.17/backends/multi/multi_termlist.h
Examining data/xapian-core-1.4.17/backends/multi/multi_alltermslist.h
Examining data/xapian-core-1.4.17/backends/multi/multi_postlist.cc
Examining data/xapian-core-1.4.17/backends/multi/multi_alltermslist.cc
Examining data/xapian-core-1.4.17/backends/multi/multi_termlist.cc
Examining data/xapian-core-1.4.17/backends/multi/multi_valuelist.cc
Examining data/xapian-core-1.4.17/backends/multi/multi_postlist.h
Examining data/xapian-core-1.4.17/backends/database.cc
Examining data/xapian-core-1.4.17/backends/databasereplicator.cc
Examining data/xapian-core-1.4.17/backends/uuids.cc
Examining data/xapian-core-1.4.17/backends/dbfactory.cc
Examining data/xapian-core-1.4.17/backends/multivaluelist.h
Examining data/xapian-core-1.4.17/backends/positionlist.h
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_document.h
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_positionlist.h
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_alltermslist.cc
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_document.cc
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_alltermslist.h
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_positionlist.cc
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_database.cc
Examining data/xapian-core-1.4.17/backends/inmemory/inmemory_database.h
Examining data/xapian-core-1.4.17/backends/dbfactory_remote.cc
Examining data/xapian-core-1.4.17/backends/uuids.h
Examining data/xapian-core-1.4.17/backends/flint_lock.h
Examining data/xapian-core-1.4.17/backends/flint_lock.cc
Examining data/xapian-core-1.4.17/backends/backends.h
Examining data/xapian-core-1.4.17/backends/databasehelpers.h
Examining data/xapian-core-1.4.17/backends/databasehelpers.cc
Examining data/xapian-core-1.4.17/backends/alltermslist.cc
Examining data/xapian-core-1.4.17/backends/slowvaluelist.cc
Examining data/xapian-core-1.4.17/backends/alltermslist.h
Examining data/xapian-core-1.4.17/backends/slowvaluelist.h
Examining data/xapian-core-1.4.17/backends/dbcheck.cc
Examining data/xapian-core-1.4.17/backends/contiguousalldocspostlist.h
Examining data/xapian-core-1.4.17/backends/byte_length_strings.h
Examining data/xapian-core-1.4.17/backends/remote/remote-document.h
Examining data/xapian-core-1.4.17/backends/remote/net_postlist.cc
Examining data/xapian-core-1.4.17/backends/remote/net_termlist.h
Examining data/xapian-core-1.4.17/backends/remote/net_postlist.h
Examining data/xapian-core-1.4.17/backends/remote/remote-document.cc
Examining data/xapian-core-1.4.17/backends/remote/remote-database.h
Examining data/xapian-core-1.4.17/backends/remote/net_termlist.cc
Examining data/xapian-core-1.4.17/backends/remote/remote-database.cc
Examining data/xapian-core-1.4.17/backends/contiguousalldocspostlist.cc
Examining data/xapian-core-1.4.17/backends/databasereplicator.h
Examining data/xapian-core-1.4.17/examples/simplesearch.cc
Examining data/xapian-core-1.4.17/examples/quest.cc
Examining data/xapian-core-1.4.17/examples/xapian-metadata.cc
Examining data/xapian-core-1.4.17/examples/simpleindex.cc
Examining data/xapian-core-1.4.17/examples/xapian-pos.cc
Examining data/xapian-core-1.4.17/examples/simpleexpand.cc
Examining data/xapian-core-1.4.17/examples/copydatabase.cc
Examining data/xapian-core-1.4.17/matcher/multiandpostlist.h
Examining data/xapian-core-1.4.17/matcher/localsubmatch.cc
Examining data/xapian-core-1.4.17/matcher/valuestreamdocument.cc
Examining data/xapian-core-1.4.17/matcher/orpositionlist.cc
Examining data/xapian-core-1.4.17/matcher/branchpostlist.h
Examining data/xapian-core-1.4.17/matcher/orpostlist.cc
Examining data/xapian-core-1.4.17/matcher/multixorpostlist.h
Examining data/xapian-core-1.4.17/matcher/mergepostlist.cc
Examining data/xapian-core-1.4.17/matcher/multixorpostlist.cc
Examining data/xapian-core-1.4.17/matcher/valuegepostlist.h
Examining data/xapian-core-1.4.17/matcher/maxpostlist.h
Examining data/xapian-core-1.4.17/matcher/exactphrasepostlist.h
Examining data/xapian-core-1.4.17/matcher/collapser.h
Examining data/xapian-core-1.4.17/matcher/orpospostlist.h
Examining data/xapian-core-1.4.17/matcher/mergepostlist.h
Examining data/xapian-core-1.4.17/matcher/multimatch.h
Examining data/xapian-core-1.4.17/matcher/andmaybepostlist.h
Examining data/xapian-core-1.4.17/matcher/phrasepostlist.cc
Examining data/xapian-core-1.4.17/matcher/orpostlist.h
Examining data/xapian-core-1.4.17/matcher/selectpostlist.cc
Examining data/xapian-core-1.4.17/matcher/multiandpostlist.cc
Examining data/xapian-core-1.4.17/matcher/multimatch.cc
Examining data/xapian-core-1.4.17/matcher/queryoptimiser.h
Examining data/xapian-core-1.4.17/matcher/localsubmatch.h
Examining data/xapian-core-1.4.17/matcher/andnotpostlist.h
Examining data/xapian-core-1.4.17/matcher/valuestreamdocument.h
Examining data/xapian-core-1.4.17/matcher/andmaybepostlist.cc
Examining data/xapian-core-1.4.17/matcher/valuerangepostlist.cc
Examining data/xapian-core-1.4.17/matcher/branchpostlist.cc
Examining data/xapian-core-1.4.17/matcher/synonympostlist.cc
Examining data/xapian-core-1.4.17/matcher/maxpostlist.cc
Examining data/xapian-core-1.4.17/matcher/remotesubmatch.h
Examining data/xapian-core-1.4.17/matcher/valuegepostlist.cc
Examining data/xapian-core-1.4.17/matcher/orpospostlist.cc
Examining data/xapian-core-1.4.17/matcher/selectpostlist.h
Examining data/xapian-core-1.4.17/matcher/valuerangepostlist.h
Examining data/xapian-core-1.4.17/matcher/msetpostlist.h
Examining data/xapian-core-1.4.17/matcher/nearpostlist.cc
Examining data/xapian-core-1.4.17/matcher/synonympostlist.h
Examining data/xapian-core-1.4.17/matcher/nearpostlist.h
Examining data/xapian-core-1.4.17/matcher/collapser.cc
Examining data/xapian-core-1.4.17/matcher/externalpostlist.h
Examining data/xapian-core-1.4.17/matcher/phrasepostlist.h
Examining data/xapian-core-1.4.17/matcher/extraweightpostlist.h
Examining data/xapian-core-1.4.17/matcher/msetcmp.cc
Examining data/xapian-core-1.4.17/matcher/msetcmp.h
Examining data/xapian-core-1.4.17/matcher/orpositionlist.h
Examining data/xapian-core-1.4.17/matcher/msetpostlist.cc
Examining data/xapian-core-1.4.17/matcher/andnotpostlist.cc
Examining data/xapian-core-1.4.17/matcher/exactphrasepostlist.cc
Examining data/xapian-core-1.4.17/matcher/remotesubmatch.cc
Examining data/xapian-core-1.4.17/matcher/externalpostlist.cc
Examining data/xapian-core-1.4.17/net/replicatetcpserver.h
Examining data/xapian-core-1.4.17/net/remotetcpclient.h
Examining data/xapian-core-1.4.17/net/replicatetcpclient.cc
Examining data/xapian-core-1.4.17/net/progclient.h
Examining data/xapian-core-1.4.17/net/serialise.cc
Examining data/xapian-core-1.4.17/net/remoteconnection.h
Examining data/xapian-core-1.4.17/net/serialise-error.h
Examining data/xapian-core-1.4.17/net/resolver.h
Examining data/xapian-core-1.4.17/net/remoteserver.h
Examining data/xapian-core-1.4.17/net/tcpserver.h
Examining data/xapian-core-1.4.17/net/remoteserver.cc
Examining data/xapian-core-1.4.17/net/replicatetcpserver.cc
Examining data/xapian-core-1.4.17/net/serialise.h
Examining data/xapian-core-1.4.17/net/remoteconnection.cc
Examining data/xapian-core-1.4.17/net/remotetcpclient.cc
Examining data/xapian-core-1.4.17/net/remoteprotocol.h
Examining data/xapian-core-1.4.17/net/remotetcpserver.cc
Examining data/xapian-core-1.4.17/net/tcpclient.h
Examining data/xapian-core-1.4.17/net/serialise-error.cc
Examining data/xapian-core-1.4.17/net/tcpserver.cc
Examining data/xapian-core-1.4.17/net/remotetcpserver.h
Examining data/xapian-core-1.4.17/net/tcpclient.cc
Examining data/xapian-core-1.4.17/net/length.cc
Examining data/xapian-core-1.4.17/net/progclient.cc
Examining data/xapian-core-1.4.17/net/replicatetcpclient.h
Examining data/xapian-core-1.4.17/net/length.h
Examining data/xapian-core-1.4.17/geospatial/latlong_metrics.cc
Examining data/xapian-core-1.4.17/geospatial/latlong_posting_source.cc
Examining data/xapian-core-1.4.17/geospatial/geoencode.h
Examining data/xapian-core-1.4.17/geospatial/latlong_distance_keymaker.cc
Examining data/xapian-core-1.4.17/geospatial/latlongcoord.cc
Examining data/xapian-core-1.4.17/geospatial/geoencode.cc
Examining data/xapian-core-1.4.17/bin/xapian-replicate-server.cc
Examining data/xapian-core-1.4.17/bin/xapian-check.cc
Examining data/xapian-core-1.4.17/bin/xapian-replicate.cc
Examining data/xapian-core-1.4.17/bin/xapian-tcpsrv.cc
Examining data/xapian-core-1.4.17/bin/xapian-inspect.cc
Examining data/xapian-core-1.4.17/bin/xapian-compact.cc
Examining data/xapian-core-1.4.17/bin/xapian-delve.cc
Examining data/xapian-core-1.4.17/bin/xapian-progsrv.cc
Examining data/xapian-core-1.4.17/queryparser/queryparser_token.h
Examining data/xapian-core-1.4.17/queryparser/queryparser.cc
Examining data/xapian-core-1.4.17/queryparser/cjk-tokenizer.cc
Examining data/xapian-core-1.4.17/queryparser/cjk-tokenizer.h
Examining data/xapian-core-1.4.17/queryparser/termgenerator.cc
Examining data/xapian-core-1.4.17/queryparser/queryparser_internal.h
Examining data/xapian-core-1.4.17/queryparser/termgenerator_internal.h
Examining data/xapian-core-1.4.17/queryparser/queryparser_internal.cc
Examining data/xapian-core-1.4.17/queryparser/lemon.c
Examining data/xapian-core-1.4.17/queryparser/termgenerator_internal.cc
Examining data/xapian-core-1.4.17/common/io_utils.h
Examining data/xapian-core-1.4.17/common/gnu_getopt.h
Examining data/xapian-core-1.4.17/common/pack.h
Examining data/xapian-core-1.4.17/common/safe.cc
Examining data/xapian-core-1.4.17/common/errno_to_string.cc
Examining data/xapian-core-1.4.17/common/stringutils.h
Examining data/xapian-core-1.4.17/common/safedirent.h
Examining data/xapian-core-1.4.17/common/safeunistd.h
Examining data/xapian-core-1.4.17/common/safesyssocket.h
Examining data/xapian-core-1.4.17/common/replicate_utils.cc
Examining data/xapian-core-1.4.17/common/autoptr.h
Examining data/xapian-core-1.4.17/common/min_non_zero.h
Examining data/xapian-core-1.4.17/common/noreturn.h
Examining data/xapian-core-1.4.17/common/fd.h
Examining data/xapian-core-1.4.17/common/bitstream.cc
Examining data/xapian-core-1.4.17/common/filetests.h
Examining data/xapian-core-1.4.17/common/fileutils.h
Examining data/xapian-core-1.4.17/common/safesysselect.h
Examining data/xapian-core-1.4.17/common/closefrom.h
Examining data/xapian-core-1.4.17/common/safewinsock2.h
Examining data/xapian-core-1.4.17/common/safesyswait.h
Examining data/xapian-core-1.4.17/common/errno_to_string.h
Examining data/xapian-core-1.4.17/common/str.h
Examining data/xapian-core-1.4.17/common/posixy_wrapper.cc
Examining data/xapian-core-1.4.17/common/parseint.h
Examining data/xapian-core-1.4.17/common/alignment_cast.h
Examining data/xapian-core-1.4.17/common/serialise-double.h
Examining data/xapian-core-1.4.17/common/msvc_dirent.h
Examining data/xapian-core-1.4.17/common/replicationprotocol.h
Examining data/xapian-core-1.4.17/common/str.cc
Examining data/xapian-core-1.4.17/common/internaltypes.h
Examining data/xapian-core-1.4.17/common/omassert.h
Examining data/xapian-core-1.4.17/common/log2.h
Examining data/xapian-core-1.4.17/common/keyword.cc
Examining data/xapian-core-1.4.17/common/closefrom.cc
Examining data/xapian-core-1.4.17/common/bitstream.h
Examining data/xapian-core-1.4.17/common/exp10.h
Examining data/xapian-core-1.4.17/common/output.h
Examining data/xapian-core-1.4.17/common/debuglog.cc
Examining data/xapian-core-1.4.17/common/append_filename_arg.h
Examining data/xapian-core-1.4.17/common/keyword.h
Examining data/xapian-core-1.4.17/common/safenetdb.h
Examining data/xapian-core-1.4.17/common/replicate_utils.h
Examining data/xapian-core-1.4.17/common/safefcntl.h
Examining data/xapian-core-1.4.17/common/debuglog.h
Examining data/xapian-core-1.4.17/common/wordaccess.h
Examining data/xapian-core-1.4.17/common/getopt.cc
Examining data/xapian-core-1.4.17/common/posixy_wrapper.h
Examining data/xapian-core-1.4.17/common/overflow.h
Examining data/xapian-core-1.4.17/common/submatch.h
Examining data/xapian-core-1.4.17/common/safewindows.h
Examining data/xapian-core-1.4.17/common/socket_utils.h
Examining data/xapian-core-1.4.17/common/omassert.cc
Examining data/xapian-core-1.4.17/common/compression_stream.h
Examining data/xapian-core-1.4.17/common/output-internal.h
Examining data/xapian-core-1.4.17/common/setenv.h
Examining data/xapian-core-1.4.17/common/compression_stream.cc
Examining data/xapian-core-1.4.17/common/pretty.h
Examining data/xapian-core-1.4.17/common/msvcignoreinvalidparam.h
Examining data/xapian-core-1.4.17/common/msvc_dirent.cc
Examining data/xapian-core-1.4.17/common/socket_utils.cc
Examining data/xapian-core-1.4.17/common/serialise-double.cc
Examining data/xapian-core-1.4.17/common/io_utils.cc
Examining data/xapian-core-1.4.17/common/safesysstat.h
Examining data/xapian-core-1.4.17/common/realtime.h
Examining data/xapian-core-1.4.17/common/fileutils.cc

FINAL RESULTS:

data/xapian-core-1.4.17/tests/api_backend.cc:1166:11:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    (void)chmod(path.c_str(), 0700);
data/xapian-core-1.4.17/tests/api_backend.cc:1170:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    TEST(chmod(path.c_str(), 0500) == 0);
data/xapian-core-1.4.17/tests/api_backend.cc:1180:8:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
	(void)chmod(path.c_str(), 0700);
data/xapian-core-1.4.17/tests/api_backend.cc:1183:10:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
    TEST(chmod(path.c_str(), 0700) == 0);
data/xapian-core-1.4.17/tests/harness/fdtracker.cc:146:12:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
	int res = readlink(proc_symlink.c_str(), buf, sizeof(buf));
data/xapian-core-1.4.17/backends/flint_lock.cc:404:2:  [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/cat", "/bin/cat", static_cast<void*>(NULL));
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/languages/compiler/generator.c:1292:13:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
            sprintf(buf, "%sp[%sc + %d]", z, z, shortest_size - 1);
data/xapian-core-1.4.17/net/progclient.cc:168:5:  [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(progname.c_str(), const_cast<char *const *>(new_argv));
data/xapian-core-1.4.17/queryparser/lemon.c:40:12:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
extern int access(const char *path, int mode);
data/xapian-core-1.4.17/queryparser/lemon.c:1506:3:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  vfprintf(stderr,format,ap);
data/xapian-core-1.4.17/queryparser/lemon.c:1558:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(output_filename, z);
data/xapian-core-1.4.17/queryparser/lemon.c:1571:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(output_header_filename, z);
data/xapian-core-1.4.17/queryparser/lemon.c:3411:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        if( access(path,modemask)==0 ) break;
data/xapian-core-1.4.17/queryparser/lemon.c:3493:9:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
    if( access(user_templatename,004)==-1 ){
data/xapian-core-1.4.17/queryparser/lemon.c:3515:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  if( access(buf,004)==0 ){
data/xapian-core-1.4.17/queryparser/lemon.c:3517:13:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
  }else if( access(templatename,004)==0 ){
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:148:2:  [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(), static_cast<void*>(0));
data/xapian-core-1.4.17/tests/harness/unixcmds.cc:56:15:  [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 res = system(cmd.c_str());
data/xapian-core-1.4.17/tests/perftest/runprocess.cc:31: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-core-1.4.17/tests/perftest/runprocess.cc:41: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-core-1.4.17/backends/chert/chert_database.cc:396: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.
    const char *p = getenv("XAPIAN_MAX_CHANGESETS");
data/xapian-core-1.4.17/backends/chert/chert_database.cc:1076: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.
    const char *p = getenv("XAPIAN_FLUSH_THRESHOLD");
data/xapian-core-1.4.17/backends/chert/chert_databasereplicator.cc:65: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.
    const char *p = getenv("XAPIAN_MAX_CHANGESETS");
data/xapian-core-1.4.17/backends/glass/glass_changes.cc:64: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.
    const char *p = getenv("XAPIAN_MAX_CHANGESETS");
data/xapian-core-1.4.17/backends/glass/glass_database.cc:1027: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.
    const char *p = getenv("XAPIAN_FLUSH_THRESHOLD");
data/xapian-core-1.4.17/common/debuglog.cc:52: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.
    const char* f = getenv("XAPIAN_DEBUG_LOG");
data/xapian-core-1.4.17/common/debuglog.cc:102:22:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	    const char* v = getenv("XAPIAN_DEBUG_FLAGS");
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/net/progclient.cc:230:15:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    BOOL ok = CreateProcess(0, &cmdline[0], 0, 0, TRUE, 0, 0, 0,
data/xapian-core-1.4.17/net/progclient.cc:230:15:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    BOOL ok = CreateProcess(0, &cmdline[0], 0, 0, TRUE, 0, 0, 0,
data/xapian-core-1.4.17/queryparser/cjk-tokenizer.cc:44:32:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    static bool result = ((p = getenv("XAPIAN_CJK_NGRAM")) != NULL && *p);
data/xapian-core-1.4.17/queryparser/lemon.c:3395: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.
    pathlist = getenv("PATH");
data/xapian-core-1.4.17/tests/api_wrdb.cc:2015:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:295:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(0, cmdline, 0, 0, TRUE, 0, 0, 0, &startupinfo, &procinfo);
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:295:10:  [3] (shell) CreateProcess:
  This causes a new process to execute and is difficult to use safely
  (CWE-78). Specify the application path in the first argument, NOT as part
  of the second, or embedded spaces could allow an attacker to force a
  different program to run.
    ok = CreateProcess(0, cmdline, 0, 0, TRUE, 0, 0, 0, &startupinfo, &procinfo);
data/xapian-core-1.4.17/tests/harness/cputimer.cc:53: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.
    static bool skip = (getenv("AUTOMATED_TESTING") != NULL);
data/xapian-core-1.4.17/tests/harness/testsuite.cc:129: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 *p = getenv("srcdir");
data/xapian-core-1.4.17/tests/harness/testsuite.cc:318:4:  [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.
		(getenv("XAPIAN_TESTSUITE_SIG_DFL") == NULL);
data/xapian-core-1.4.17/tests/harness/testsuite.cc:804:6:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	if (getenv("XAPIAN_TESTSUITE_VALGRIND") != NULL) {
data/xapian-core-1.4.17/tests/harness/testsuite.cc:818:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *p = getenv("XAPIAN_TESTSUITE_OUTPUT");
data/xapian-core-1.4.17/tests/harness/testsuite.cc:872:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *p = getenv("VERBOSE");
data/xapian-core-1.4.17/tests/perftest/perftest.cc:297:18:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
	const char *p = getenv("XAPIAN_FLUSH_THRESHOLD");
data/xapian-core-1.4.17/tests/perftest/perftest_randomidx.cc:102:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/xapian-core-1.4.17/tests/soaktest/soaktest.cc:42:5:  [3] (random) srandom:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srandom(g_random_seed);
data/xapian-core-1.4.17/tests/soaktest/soaktest.cc:44:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(g_random_seed);
data/xapian-core-1.4.17/tests/soaktest/soaktest.cc:52:58:  [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.
    unsigned long int r = static_cast<unsigned long int>(random());
data/xapian-core-1.4.17/tests/stemtest.cc:54:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/xapian-core-1.4.17/tests/stemtest.cc:86:5:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
    srand(seed);
data/xapian-core-1.4.17/api/replication.cc:458:39:  [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).
	replicator.reset(DatabaseReplicator::open(replica_path));
data/xapian-core-1.4.17/api/replication.cc:519:25:  [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).
				DatabaseReplicator::open(get_replica_path(live_id ^ 1)));
data/xapian-core-1.4.17/api/replication.cc:563:25:  [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).
				DatabaseReplicator::open(replica_path));
data/xapian-core-1.4.17/api/replication.cc:583: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).
			    DatabaseReplicator::open(get_replica_path(live_id ^ 1)));
data/xapian-core-1.4.17/api/valuerangeproc.cc:84:10:  [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).
    x1 = atoi(s.c_str());
data/xapian-core-1.4.17/api/valuerangeproc.cc:86:10:  [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).
    x2 = atoi(s.c_str() + i + 1);
data/xapian-core-1.4.17/api/valuerangeproc.cc:88:9:  [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).
    y = atoi(s.c_str() + j + 1);
data/xapian-core-1.4.17/api/valuerangeproc.cc:96: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 max_month_length[12] = {
data/xapian-core-1.4.17/api/valuerangeproc.cc:194: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[8];
data/xapian-core-1.4.17/api/valuerangeproc.cc:361: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_b[8], buf_e[8];
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:180: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[REASONABLE_BASE_SIZE];
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:241: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(bit_map0, start, n);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:246: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(bit_map0, start, bit_map_size);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:250: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(bit_map, bit_map0, bit_map_size);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:400: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(new_bit_map0, bit_map0, bit_map_size);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:403: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(new_bit_map, bit_map, bit_map_size);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:510: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(bit_map0, bit_map, bit_map_size);
data/xapian-core-1.4.17/backends/chert/chert_check.cc:245: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 (!B.open(*rev_ptr)) {
data/xapian-core-1.4.17/backends/chert/chert_check.cc:254: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).
	    B.open();
data/xapian-core-1.4.17/backends/chert/chert_check.cc:273: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).
	int fd = ::open((path + "DB").c_str(), O_RDONLY | O_BINARY | O_CLOEXEC);
data/xapian-core-1.4.17/backends/chert/chert_check.cc:275: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.
	unsigned char buf[65536];
data/xapian-core-1.4.17/backends/chert/chert_check.cc:373:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (!B.open(revision)) {
data/xapian-core-1.4.17/backends/chert/chert_compact.cc:685: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[64];
data/xapian-core-1.4.17/backends/chert/chert_compact.cc:686: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, "/tmp%u_%u.", c, i / 2);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:232: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).
    record_table.open();
data/xapian-core-1.4.17/backends/chert/chert_database.cc:253:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	if (spelling_table.open(revision) &&
data/xapian-core-1.4.17/backends/chert/chert_database.cc:254: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).
	    synonym_table.open(revision) &&
data/xapian-core-1.4.17/backends/chert/chert_database.cc:255:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    termlist_table.open(revision) &&
data/xapian-core-1.4.17/backends/chert/chert_database.cc:256:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    position_table.open(revision) &&
data/xapian-core-1.4.17/backends/chert/chert_database.cc:257:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    postlist_table.open(revision)) {
data/xapian-core-1.4.17/backends/chert/chert_database.cc:271: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).
	    record_table.open();
data/xapian-core-1.4.17/backends/chert/chert_database.cc:297: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).
    record_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:308: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).
    spelling_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:309: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).
    synonym_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:310: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).
    termlist_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:311: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).
    position_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:312: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).
    postlist_table.open(revision);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:349: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[REASONABLE_CHANGESET_SIZE];
data/xapian-core-1.4.17/backends/chert/chert_database.cc:398: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).
	max_changesets = atoi(p);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:1078: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).
	flush_threshold = atoi(p);
data/xapian-core-1.4.17/backends/chert/chert_databasereplicator.cc:67: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).
	max_changesets = atoi(p);
data/xapian-core-1.4.17/backends/chert/chert_databasereplicator.cc:277: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).
	record_table.open();
data/xapian-core-1.4.17/backends/chert/chert_dbcheck.cc:82: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 (!table.open(*rev_ptr)) {
data/xapian-core-1.4.17/backends/chert/chert_dbcheck.cc:88: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).
	table.open();
data/xapian-core-1.4.17/backends/chert/chert_postlist.h:73: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).
	bool open(chert_revision_number_t revno) {
data/xapian-core-1.4.17/backends/chert/chert_postlist.h:75:25:  [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 ChertTable::open(revno);
data/xapian-core-1.4.17/backends/chert/chert_spelling.cc:238: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(buf.data + 1, word.data() + start, 3);
data/xapian-core-1.4.17/backends/chert/chert_spelling.cc:300: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 + 1, word.data() + start, 3);
data/xapian-core-1.4.17/backends/chert/chert_spelling.h:35: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 data[4];
data/xapian-core-1.4.17/backends/chert/chert_spelling.h:41:23:  [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.
    explicit fragment(char data_[4]) { std::memcpy(data, data_, 4); }
data/xapian-core-1.4.17/backends/chert/chert_spelling.h:41:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    explicit fragment(char data_[4]) { std::memcpy(data, data_, 4); }
data/xapian-core-1.4.17/backends/chert/chert_table.cc:291: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, C[j].p, block_size);
data/xapian-core-1.4.17/backends/chert/chert_table.cc:701: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(split_p, p, block_size);  // replicate the whole block in split_p
data/xapian-core-1.4.17/backends/chert/chert_table.cc:1337:15:  [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 basenames[BTREE_BASES] = { 'A', 'B' };
data/xapian-core-1.4.17/backends/chert/chert_table.cc:2042: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).
ChertTable::open()
data/xapian-core-1.4.17/backends/chert/chert_table.cc:2059: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).
ChertTable::open(chert_revision_number_t revision)
data/xapian-core-1.4.17/backends/chert/chert_table.cc:2103:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(p, C[0].p, block_size);
data/xapian-core-1.4.17/backends/chert/chert_table.cc:2159:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		    memcpy(p, C[0].p, block_size);
data/xapian-core-1.4.17/backends/chert/chert_table.h:408: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).
	void open();
data/xapian-core-1.4.17/backends/chert/chert_table.h:427: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).
	bool open(chert_revision_number_t revision_);
data/xapian-core-1.4.17/backends/chert/chert_version.cc:59: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[VERSIONFILE_SIZE] = MAGIC_STRING;
data/xapian-core-1.4.17/backends/chert/chert_version.cc:67: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(buf + MAGIC_LEN + 4, uuid.data(), 16);
data/xapian-core-1.4.17/backends/chert/chert_version.cc:69:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = ::open(filename.c_str(), O_WRONLY|O_CREAT|O_TRUNC|O_BINARY|O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/chert/chert_version.cc:95:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = ::open(filename.c_str(), O_RDONLY|O_BINARY|O_CLOEXEC);
data/xapian-core-1.4.17/backends/chert/chert_version.cc:107: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[VERSIONFILE_SIZE + 1];
data/xapian-core-1.4.17/backends/databasehelpers.cc:59: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 magic_buf[14];
data/xapian-core-1.4.17/backends/databasehelpers.h:150:32:  [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 int port = std::atoi(line.c_str() + colon + 1);
data/xapian-core-1.4.17/backends/databasereplicator.cc:49:21:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
DatabaseReplicator::open(const string & path)
data/xapian-core-1.4.17/backends/databasereplicator.h:60:33:  [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).
    static DatabaseReplicator * open(const std::string & path);
data/xapian-core-1.4.17/backends/dbcheck.cc:55:23:  [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 struct { char name[9]; } glass_tables[] = {
data/xapian-core-1.4.17/backends/dbcheck.cc:145: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.
	static const struct { char name[9]; } tables[] = {
data/xapian-core-1.4.17/backends/dbfactory.cc:84:34:  [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).
		       db.add_database(Remote::open(prog, args));
data/xapian-core-1.4.17/backends/dbfactory.cc:92:34:  [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).
		       db.add_database(Remote::open(host, port));
data/xapian-core-1.4.17/backends/dbfactory_remote.cc:41:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
Remote::open(const string &host, unsigned int port, useconds_t timeout_,
data/xapian-core-1.4.17/backends/dbfactory_remote.cc:61:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
Remote::open(const string &program, const string &args,
data/xapian-core-1.4.17/backends/flint_lock.cc:92:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int lockfd = open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/flint_lock.cc:132: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 fnm[MAX_PATH];
data/xapian-core-1.4.17/backends/flint_lock.cc:177:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int lockfd = open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/flint_lock.cc:207:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int lockfd = open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/flint_lock.cc:209:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int lockfd = open(filename.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
data/xapian-core-1.4.17/backends/glass/glass_changes.cc:66: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).
	max_changesets = atoi(p);
data/xapian-core-1.4.17/backends/glass/glass_changes.cc:173: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[10240];
data/xapian-core-1.4.17/backends/glass/glass_check.cc:296: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).
    B->open(0, version_file.get_root(tab_type), version_file.get_revision());
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:613: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[64];
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:614: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, "/tmp%u_%u.", c, i / 2);
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:788: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 name[9];
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:845:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    fd = open(destdir, O_RDWR|O_CREAT|O_TRUNC|O_BINARY|O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:989:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    out->open(FLAGS, version_file_out->get_root(t->type), version_file_out->get_revision());
data/xapian-core-1.4.17/backends/glass/glass_compact.cc:1110:28:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    version_file_out->sync(tmpfile, 1, FLAGS);
data/xapian-core-1.4.17/backends/glass/glass_cursor.h:125:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	    std::memcpy(new_data, data, block_size + 8);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:212:17:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if (!v.sync(tmpfile, rev, flags)) {
data/xapian-core-1.4.17/backends/glass/glass_database.cc:244: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).
    docdata_table.open(flags, version_file.get_root(Glass::DOCDATA), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:245: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).
    spelling_table.open(flags, version_file.get_root(Glass::SPELLING), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:246: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).
    synonym_table.open(flags, version_file.get_root(Glass::SYNONYM), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:247: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).
    termlist_table.open(flags, version_file.get_root(Glass::TERMLIST), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:248: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).
    position_table.open(flags, version_file.get_root(Glass::POSITION), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:249: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).
    postlist_table.open(flags, version_file.get_root(Glass::POSTLIST), rev);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:300: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[REASONABLE_CHANGESET_SIZE];
data/xapian-core-1.4.17/backends/glass/glass_database.cc:367:21:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	!version_file.sync(tmpfile, new_revision, flags)) {
data/xapian-core-1.4.17/backends/glass/glass_database.cc:369:15:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	(void)unlink(tmpfile.c_str());
data/xapian-core-1.4.17/backends/glass/glass_database.cc:622: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).
	docdata_table.open(flags, version_file.get_root(Glass::DOCDATA), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:623: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).
	spelling_table.open(flags, version_file.get_root(Glass::SPELLING), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:624: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).
	synonym_table.open(flags, version_file.get_root(Glass::SYNONYM), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:625: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).
	termlist_table.open(flags, version_file.get_root(Glass::TERMLIST), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:626: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).
	position_table.open(flags, version_file.get_root(Glass::POSITION), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:627: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).
	postlist_table.open(flags, version_file.get_root(Glass::POSTLIST), old_revision);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:1029: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).
	flush_threshold = atoi(p);
data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc:150:26:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    int fd = posixy_open(tmpfile.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc:153:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	msg += tmpfile;
data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc:163:24:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if (!io_tmp_rename(tmpfile, version_file)) {
data/xapian-core-1.4.17/backends/glass/glass_freelist.cc:225: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, pw, block_size);
data/xapian-core-1.4.17/backends/glass/glass_freelist.cc:254: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, pw, block_size);
data/xapian-core-1.4.17/backends/glass/glass_postlist.h:82: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).
    void open(int flags_, const RootInfo & root_info,
data/xapian-core-1.4.17/backends/glass/glass_postlist.h:85: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).
	GlassTable::open(flags_, root_info, rev);
data/xapian-core-1.4.17/backends/glass/glass_spelling.cc:242: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(buf.data + 1, word.data() + start, 3);
data/xapian-core-1.4.17/backends/glass/glass_spelling.cc:304: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 + 1, word.data() + start, 3);
data/xapian-core-1.4.17/backends/glass/glass_spelling.h: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 data[4];
data/xapian-core-1.4.17/backends/glass/glass_spelling.h:45:23:  [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.
    explicit fragment(char data_[4]) { std::memcpy(data, data_, 4); }
data/xapian-core-1.4.17/backends/glass/glass_spelling.h:45:45:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    explicit fragment(char data_[4]) { std::memcpy(data, data_, 4); }
data/xapian-core-1.4.17/backends/glass/glass_table.cc:576: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(b + e, item.get_address(), l);
data/xapian-core-1.4.17/backends/glass/glass_table.cc:585: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(b + e, item.get_address(), l);
data/xapian-core-1.4.17/backends/glass/glass_table.cc:589: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(p + e, b + e, block_size - e);  /* copy back */
data/xapian-core-1.4.17/backends/glass/glass_table.cc:873: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(split_p, p, block_size);  // replicate the whole block in split_p
data/xapian-core-1.4.17/backends/glass/glass_table.cc:967: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(split_p, p, block_size);  // replicate the whole block in split_p
data/xapian-core-1.4.17/backends/glass/glass_table.cc:2003: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).
GlassTable::open(int flags_, const RootInfo & root_info,
data/xapian-core-1.4.17/backends/glass/glass_table.h:358:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(p + BYTES_PER_BLOCK_NUMBER, newkey.get_address(), len);
data/xapian-core-1.4.17/backends/glass/glass_table.h:370:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	std::memcpy(p + BYTES_PER_BLOCK_NUMBER + K1, newkey.get_address() + K1, i);
data/xapian-core-1.4.17/backends/glass/glass_table.h:504: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).
    void open(int flags_, const RootInfo & root_info,
data/xapian-core-1.4.17/backends/glass/glass_version.cc:67: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 GLASS_VERSION_MAGIC[GLASS_VERSION_MAGIC_AND_VERSION_LEN] = {
data/xapian-core-1.4.17/backends/glass/glass_version.cc:123: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[256];
data/xapian-core-1.4.17/backends/glass/glass_version.cc:288:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    string tmpfile;
data/xapian-core-1.4.17/backends/glass/glass_version.cc:297:19:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	fd = posixy_open(tmpfile.c_str(), O_CREAT|O_TRUNC|O_WRONLY|O_BINARY, 0666);
data/xapian-core-1.4.17/backends/glass/glass_version.cc:299:75:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	    throw Xapian::DatabaseOpeningError("Couldn't write new rev file: " + tmpfile,
data/xapian-core-1.4.17/backends/glass/glass_version.cc:323:12:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    RETURN(tmpfile);
data/xapian-core-1.4.17/backends/glass/glass_version.cc:327:35:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
GlassVersion::sync(const string & tmpfile,
data/xapian-core-1.4.17/backends/glass/glass_version.cc:348:11:  [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-core-1.4.17/backends/glass/glass_version.cc:349:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		(void)unlink(tmpfile.c_str());
data/xapian-core-1.4.17/backends/glass/glass_version.cc:355:11:  [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-core-1.4.17/backends/glass/glass_version.cc:357:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
		(void)unlink(tmpfile.c_str());
data/xapian-core-1.4.17/backends/glass/glass_version.cc:363:7:  [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-core-1.4.17/backends/glass/glass_version.cc:364:25:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	    if (!io_tmp_rename(tmpfile, db_dir + "/iamglass")) {
data/xapian-core-1.4.17/backends/glass/glass_version.h:184:35:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    bool sync(const std::string & tmpfile,
data/xapian-core-1.4.17/backends/uuids.cc:66: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[STRING_SIZE];
data/xapian-core-1.4.17/backends/uuids.cc:67: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("/proc/sys/kernel/random/uuid", O_RDONLY);
data/xapian-core-1.4.17/backends/uuids.cc:80: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(uuid_data, &uu, BINARY_SIZE);
data/xapian-core-1.4.17/backends/uuids.cc:92: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(uuid_data, &uu, BINARY_SIZE);
data/xapian-core-1.4.17/backends/uuids.cc:104: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(uuid_data, &uuid, BINARY_SIZE);
data/xapian-core-1.4.17/backends/uuids.h:64:39:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    void assign(const char* p) { std::memcpy(uuid_data, p, BINARY_SIZE); }
data/xapian-core-1.4.17/backends/uuids.h:68: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 uuid_data[BINARY_SIZE];
data/xapian-core-1.4.17/bin/xapian-inspect.cc:67: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[20];
data/xapian-core-1.4.17/bin/xapian-inspect.cc:68:7:  [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, "\\x%02x", int(ch));
data/xapian-core-1.4.17/bin/xapian-inspect.cc:283: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).
	single_file_fd = open(db_path.c_str(), O_RDONLY | O_BINARY);
data/xapian-core-1.4.17/bin/xapian-inspect.cc:338: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).
	table.open(0, version_file.get_root(table_code), rev);
data/xapian-core-1.4.17/bin/xapian-progsrv.cc:74: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).
		timeout = atoi(optarg) * 1e-3;
data/xapian-core-1.4.17/bin/xapian-replicate-server.cc:76:10:  [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).
		port = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-replicate.cc:109:10:  [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).
		port = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-replicate.cc:115: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).
		interval = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-replicate.cc:118:23:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		reader_close_time = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-replicate.cc:121: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).
		timeout = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-tcpsrv.cc:113:10:  [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).
		port = atoi(optarg);
data/xapian-core-1.4.17/bin/xapian-tcpsrv.cc:122: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).
		active_timeout = atoi(optarg) * 1e-3;
data/xapian-core-1.4.17/bin/xapian-tcpsrv.cc:125:18:  [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).
		idle_timeout = atoi(optarg) * 1e-3;
data/xapian-core-1.4.17/bin/xapian-tcpsrv.cc:128:35:  [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).
		active_timeout = idle_timeout = atoi(optarg) * 1e-3;
data/xapian-core-1.4.17/common/bitstream.cc:44: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.
    static const unsigned char flstab[256] = {
data/xapian-core-1.4.17/common/closefrom.cc:96: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).
    int dir = open(path, O_RDONLY|O_DIRECTORY);
data/xapian-core-1.4.17/common/closefrom.cc:100:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buf[1024];
data/xapian-core-1.4.17/common/closefrom.cc:162: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).
    int dir = open(path, O_RDONLY|O_DIRECTORY);
data/xapian-core-1.4.17/common/closefrom.cc:170:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	    char buf[1024];
data/xapian-core-1.4.17/common/closefrom.cc:221: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 path[6 + sizeof(pid_t) * 3 + 4];
data/xapian-core-1.4.17/common/closefrom.cc:222: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(path, "/proc/%ld/fd", long(getpid()));
data/xapian-core-1.4.17/common/debuglog.cc:88:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    fd = open(fnm.c_str(), flags, 0644);
data/xapian-core-1.4.17/common/errno_to_string.cc:61: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-core-1.4.17/common/io_utils.cc:72:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = ::open(fname, flags, 0666);
data/xapian-core-1.4.17/common/io_utils.cc:98: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 toclose[MIN_WRITE_FD];
data/xapian-core-1.4.17/common/io_utils.h:39: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 ::open(fname, O_RDONLY | O_BINARY | O_CLOEXEC);
data/xapian-core-1.4.17/common/pack.h:158: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 tmp[sizeof(U) + 1];
data/xapian-core-1.4.17/common/posixy_wrapper.h:45:24:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
# define posixy_open ::open
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/common/wordaccess.h:120: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(&value, ptr, sizeof(UINT));
data/xapian-core-1.4.17/common/wordaccess.h:141: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(ptr, &v, sizeof(UINT));
data/xapian-core-1.4.17/examples/simpleexpand.cc:74:24:  [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).
	    rset.add_document(atoi(*argv));
data/xapian-core-1.4.17/include/xapian/constinfo.h:31: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 C_tab[256];
data/xapian-core-1.4.17/include/xapian/constinfo.h:33: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 str[8];
data/xapian-core-1.4.17/include/xapian/constinfo.h:36: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 stemmer_data[256];
data/xapian-core-1.4.17/include/xapian/dbfactory.h:101:36:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
XAPIAN_DEPRECATED(WritableDatabase open());
data/xapian-core-1.4.17/include/xapian/dbfactory.h:104:1:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
open()
data/xapian-core-1.4.17/include/xapian/dbfactory.h:120: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).
XAPIAN_DEPRECATED(Database open(const std::string &dir));
data/xapian-core-1.4.17/include/xapian/dbfactory.h:123:1:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
open(const std::string &dir)
data/xapian-core-1.4.17/include/xapian/dbfactory.h:146:36:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
XAPIAN_DEPRECATED(WritableDatabase open(const std::string &dir, int action, int block_size = 0));
data/xapian-core-1.4.17/include/xapian/dbfactory.h:149:1:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
open(const std::string &dir, int action, int block_size)
data/xapian-core-1.4.17/include/xapian/dbfactory.h:187: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).
Database open(const std::string &host, unsigned int port, useconds_t timeout = 10000, useconds_t connect_timeout = 10000);
data/xapian-core-1.4.17/include/xapian/dbfactory.h:226: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).
Database open(const std::string &program, const std::string &args, useconds_t timeout = 10000);
data/xapian-core-1.4.17/include/xapian/queryparser.h:1306: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[9];
data/xapian-core-1.4.17/include/xapian/unicode.h:333: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[4];
data/xapian-core-1.4.17/languages/compiler/driver.c:89:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * output = fopen(s, "w");
data/xapian-core-1.4.17/languages/compiler/driver.c:381:21:  [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(new_name, leaf, len);
data/xapian-core-1.4.17/languages/compiler/driver.c:411:21:  [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(new_name, leaf, len);
data/xapian-core-1.4.17/languages/compiler/generator.c:1286:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[64];
data/xapian-core-1.4.17/languages/compiler/header.h:135: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 token_disabled[NUM_TOKEN_CODES];
data/xapian-core-1.4.17/languages/compiler/header.h:316: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 * S[10];  /* strings */
data/xapian-core-1.4.17/languages/compiler/space.c:210: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 s[30];
data/xapian-core-1.4.17/languages/compiler/space.c:211: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(s, "%d", i);
data/xapian-core-1.4.17/languages/compiler/tokeniser.c:26:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FILE * input = fopen(filename, "r");
data/xapian-core-1.4.17/languages/finnish.cc:292:23:  [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 unsigned char af_6[30] =
data/xapian-core-1.4.17/languages/indonesian.cc:112:23:  [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 unsigned char af_2[3] =
data/xapian-core-1.4.17/languages/indonesian.cc:136:23:  [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 unsigned char af_3[12] =
data/xapian-core-1.4.17/languages/indonesian.cc:163:23:  [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 unsigned char af_4[6] =
data/xapian-core-1.4.17/languages/lovins.cc:1034:23:  [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 unsigned char af_1[294] =
data/xapian-core-1.4.17/net/progclient.cc:146: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).
    int stderrfd = open("/dev/null", O_WRONLY);
data/xapian-core-1.4.17/net/progclient.cc:161:39:  [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 **new_argv = new const char *[argvec.size() + 2];
data/xapian-core-1.4.17/net/progclient.cc:180: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 pipename[256];
data/xapian-core-1.4.17/net/progclient.cc:181: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(pipename, "\\\\.\\pipe\\xapian-remote-%lx-%lx-%x",
data/xapian-core-1.4.17/net/remoteconnection.cc:122: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[CHUNKSIZE];
data/xapian-core-1.4.17/net/remoteconnection.cc:159: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[CHUNKSIZE];
data/xapian-core-1.4.17/net/remoteconnection.cc:410: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[CHUNKSIZE];
data/xapian-core-1.4.17/net/remoteconnection.cc:418: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(buf + 1, enc_size.data(), enc_size.size());
data/xapian-core-1.4.17/net/remoteserver.cc:377:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char protocol[2] = {
data/xapian-core-1.4.17/net/tcpserver.cc:240: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[INET_ADDRSTRLEN];
data/xapian-core-1.4.17/queryparser/lemon.c:93: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(&zBuf[*pnUsed], zIn, nIn);
data/xapian-core-1.4.17/queryparser/lemon.c:102: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 zTemp[50];
data/xapian-core-1.4.17/queryparser/lemon.c:1532:15:  [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.
  azDefine = (char **) realloc(azDefine, sizeof(azDefine[0])*nDefine);
data/xapian-core-1.4.17/queryparser/lemon.c:1914: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 *set[LISTSIZE];
data/xapian-core-1.4.17/queryparser/lemon.c:2253:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *alias[MAXRHS]; /* Aliases for each RHS symbol (or NULL) */
data/xapian-core-1.4.17/queryparser/lemon.c:2638:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char zLine[50];
data/xapian-core-1.4.17/queryparser/lemon.c:2666:11:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
          memcpy(zBuf, zLine, nLine);
data/xapian-core-1.4.17/queryparser/lemon.c:2681:9:  [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(zBuf, zNew, nNew);
data/xapian-core-1.4.17/queryparser/lemon.c:2870:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(ps.filename,"rb");
data/xapian-core-1.4.17/queryparser/lemon.c:3098:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(lemp->outname,mode);
data/xapian-core-1.4.17/queryparser/lemon.c:3312: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[20];
data/xapian-core-1.4.17/queryparser/lemon.c:3460: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 line[LINESIZE];
data/xapian-core-1.4.17/queryparser/lemon.c:3485: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[1000];
data/xapian-core-1.4.17/queryparser/lemon.c:3499:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(user_templatename,"rb");
data/xapian-core-1.4.17/queryparser/lemon.c:3529:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  in = fopen(tpltname,"rb");
data/xapian-core-1.4.17/queryparser/lemon.c:3648: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 zInt[40];
data/xapian-core-1.4.17/queryparser/lemon.c:3701: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 used[MAXRHS];     /* True for each RHS element which is used */
data/xapian-core-1.4.17/queryparser/lemon.c:3702: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 zLhs[50];         /* Convert the LHS symbol into this string */
data/xapian-core-1.4.17/queryparser/lemon.c:3703: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 zOvwrt[900];      /* Comment that to allow LHS to overwrite RHS */
data/xapian-core-1.4.17/queryparser/lemon.c:3760: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(zLhs, "yymsp[%d].minor.yy%d",1-rp->nrhs,rp->lhs->dtnum);
data/xapian-core-1.4.17/queryparser/lemon.c:3763: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(zLhs, "yylhsminor.yy%d",rp->lhs->dtnum);
data/xapian-core-1.4.17/queryparser/lemon.c:4139: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 line[LINESIZE];
data/xapian-core-1.4.17/queryparser/lemon.c:4660: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 line[LINESIZE];
data/xapian-core-1.4.17/queryparser/lemon.c:4661: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 pattern[LINESIZE];
data/xapian-core-1.4.17/queryparser/queryparser_internal.cc:1856:17:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static unsigned char yycoverage[YYNSTATE][YYNTOKEN];
data/xapian-core-1.4.17/tests/api_backend.cc:312:16:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    int fd = ::open((path + "/flintlock").c_str(), O_RDONLY);
data/xapian-core-1.4.17/tests/api_backend.cc:1257: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 result[256];
data/xapian-core-1.4.17/tests/api_backend.cc:1475:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(tmp_path.c_str(), O_RDONLY|O_BINARY);
data/xapian-core-1.4.17/tests/api_backend.cc:1482:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	int fd = open(tmp_path.c_str(), O_RDONLY|O_BINARY);
data/xapian-core-1.4.17/tests/api_backend.cc:1495:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char * const words[4] = {
data/xapian-core-1.4.17/tests/api_backend.cc:1507:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char * const words2[4] = {
data/xapian-core-1.4.17/tests/api_compact.cc:98: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).
	Xapian::docid did = atoi((*t).c_str() + 1);
data/xapian-core-1.4.17/tests/api_compact.cc:602: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(outdbpath.c_str(), O_CREAT|O_RDWR|O_BINARY, 0666);
data/xapian-core-1.4.17/tests/api_compact.cc:629: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(outdbpath.c_str(), O_CREAT|O_RDWR|O_BINARY, 0666);
data/xapian-core-1.4.17/tests/api_compact.cc:644: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(outdbpath.c_str(), O_RDONLY|O_BINARY, 0666);
data/xapian-core-1.4.17/tests/api_compact.cc:648: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[8192];
data/xapian-core-1.4.17/tests/api_compactold.cc:92: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).
	Xapian::docid did = atoi((*t).c_str() + 1);
data/xapian-core-1.4.17/tests/api_db.cc:126:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out.open(dbpath);
data/xapian-core-1.4.17/tests/api_db.cc:147:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out.open(dbpath);
data/xapian-core-1.4.17/tests/api_db.cc:163:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out.open(dbpath);
data/xapian-core-1.4.17/tests/api_db.cc:202:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out.open(dbpath);
data/xapian-core-1.4.17/tests/api_query.cc:432: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 * terms[4];
data/xapian-core-1.4.17/tests/api_query.cc:532: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 * terms[4];
data/xapian-core-1.4.17/tests/api_replicate.cc:109: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).
    FD fdin(open(srcpath.c_str(), O_RDONLY | O_BINARY));
data/xapian-core-1.4.17/tests/api_replicate.cc:114: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).
    FD fdout(open(destpath.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666));
data/xapian-core-1.4.17/tests/api_replicate.cc:120: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-core-1.4.17/tests/api_replicate.cc:148:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FD fd(open(changesetpath.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0666));
data/xapian-core-1.4.17/tests/api_replicate.cc:170:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    FD fd(open(changesetpath.c_str(), O_RDONLY | O_BINARY));
data/xapian-core-1.4.17/tests/api_replicate.cc:884: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).
	    int fd = open(file.c_str(), O_WRONLY|O_TRUNC, 0666);
data/xapian-core-1.4.17/tests/api_snippets.cc:136:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    input.open(file.c_str());
data/xapian-core-1.4.17/tests/api_termgen.cc:755: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).
		weight = atoi(o);
data/xapian-core-1.4.17/tests/api_wrdb.cc:1473: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[2] = "X";
data/xapian-core-1.4.17/tests/harness/backendmanager_multi.cc:107:18:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    ofstream out(tmpfile.c_str());
data/xapian-core-1.4.17/tests/harness/backendmanager_multi.cc:110:9:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
	msg += tmpfile;
data/xapian-core-1.4.17/tests/harness/backendmanager_multi.cc:165:16:  [2] (tmpfile) tmpfile:
  Function tmpfile() has a security flaw on some systems (e.g., older System
  V systems) (CWE-377).
    if (rename(tmpfile.c_str(), db_path.c_str()) < 0) {
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc:84:25:  [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 Xapian::Remote::open("./runsrv", args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.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).
    return Xapian::Remote::open(XAPIAN_PROGSRV, args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc:98:25:  [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 Xapian::Remote::open("./runsrv", args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc:101: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).
    return Xapian::Remote::open(XAPIAN_PROGSRV, args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc:112:25:  [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 Xapian::Remote::open("./runsrv", args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remoteprog.cc:115: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).
    return Xapian::Remote::open(XAPIAN_PROGSRV, args);
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:176:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:306:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:378: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).
    return Xapian::Remote::open(LOCALHOST, port);
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:386: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).
    return Xapian::Remote::open(LOCALHOST, port);
data/xapian-core-1.4.17/tests/harness/backendmanager_remotetcp.cc:394: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).
    return Xapian::Remote::open(LOCALHOST, port);
data/xapian-core-1.4.17/tests/harness/fdtracker.cc:104:10:  [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).
	mark_fd(atoi(name));
data/xapian-core-1.4.17/tests/harness/fdtracker.cc:134: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).
	int fd = atoi(name);
data/xapian-core-1.4.17/tests/harness/fdtracker.cc:143: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[1024];
data/xapian-core-1.4.17/tests/harness/index_utils.cc:186:11:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    input.open(filename.c_str());
data/xapian-core-1.4.17/tests/harness/testsuite.cc:363: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[4096];
data/xapian-core-1.4.17/tests/harness/testsuite.cc:639: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[40];
data/xapian-core-1.4.17/tests/harness/testsuite.cc:640: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, " at %p", sigaddr);
data/xapian-core-1.4.17/tests/harness/testsuite.cc:806: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 fname[64];
data/xapian-core-1.4.17/tests/harness/testsuite.cc:807: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(fname, ".valgrind.log.%lu",
data/xapian-core-1.4.17/tests/harness/testsuite.cc:809: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).
	    vg_log_fd = open(fname, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
data/xapian-core-1.4.17/tests/harness/testsuite.cc:874: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).
	    verbose = atoi(p);
data/xapian-core-1.4.17/tests/harness/unixcmds.cc:143: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(), O_CREAT|O_WRONLY|O_BINARY, 0644);
data/xapian-core-1.4.17/tests/internaltest.cc:379: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 tested[128];
data/xapian-core-1.4.17/tests/perftest/perftest.cc:97: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[256];
data/xapian-core-1.4.17/tests/perftest/perftest.cc:117: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[256];
data/xapian-core-1.4.17/tests/perftest/perftest.cc:228: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).
PerfTestLogger::open(const string & logpath)
data/xapian-core-1.4.17/tests/perftest/perftest.cc:230:9:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    out.open(logpath.c_str(), ios::out | ios::binary | ios::trunc);
data/xapian-core-1.4.17/tests/perftest/perftest.cc:299:24:  [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).
	    flush_threshold = atoi(p);
data/xapian-core-1.4.17/tests/perftest/perftest.cc:450:17:  [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).
		repetitions = atoi(repetitions_string.c_str());
data/xapian-core-1.4.17/tests/perftest/perftest.cc:465: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).
    if (!logger.open("perflog.xml"))
data/xapian-core-1.4.17/tests/perftest/perftest.h:62: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).
    bool open(const std::string & logpath);
data/xapian-core-1.4.17/tests/perftest/runprocess.cc:44: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-core-1.4.17/tests/soaktest/soaktest.cc:73:18:  [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).
	g_random_seed = atoi(seed_str.c_str());
data/xapian-core-1.4.17/tests/soaktest/soaktest_queries.cc:49:37:  [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 int maxtermsperfield = atoi(arg.c_str());
data/xapian-core-1.4.17/tests/stemtest.cc:147:6:  [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).
	voc.open((dir + language + "/voc2.txt").c_str());
data/xapian-core-1.4.17/tests/stemtest.cc:150:5:  [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).
	st.open((dir + language + "/output2.txt").c_str());
data/xapian-core-1.4.17/tests/stemtest.cc:186:35:  [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 (!seed_str.empty()) seed = atoi(seed_str.c_str());
data/xapian-core-1.4.17/tests/unittest.cc:210: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[16];
data/xapian-core-1.4.17/tests/unittest.cc:213: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(buf, encoded.data(), encoded.size());
data/xapian-core-1.4.17/tests/unittest.cc:217: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 * ptr[3] = { NULL, buf, NULL };
data/xapian-core-1.4.17/unicode/description_append.cc:40: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[8];
data/xapian-core-1.4.17/unicode/description_append.cc:41: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, "\\x%02x", ch & 0xff);
data/xapian-core-1.4.17/backends/chert/chert_btreebase.cc:166:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ChertTable_base::read(const string & name, char ch, bool read_bitmap,
data/xapian-core-1.4.17/backends/chert/chert_btreebase.h:49:7:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	bool read(const std::string &name, char ch, bool read_bitmap,
data/xapian-core-1.4.17/backends/chert/chert_check.cc:54:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	item.key().read(&key);
data/xapian-core-1.4.17/backends/chert/chert_check.cc:278:6:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	if (read > 0) {
data/xapian-core-1.4.17/backends/chert/chert_cursor.cc:289:38:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (void)Item(C[0].p, C[0].c).key().read(key);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:288:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    stats.read(postlist_table);
data/xapian-core-1.4.17/backends/chert/chert_database.cc:1669:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    stats.read(postlist_table);
data/xapian-core-1.4.17/backends/chert/chert_dbstats.cc:33:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
ChertDatabaseStats::read(ChertPostListTable & postlist_table)
data/xapian-core-1.4.17/backends/chert/chert_dbstats.h:81:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(ChertPostListTable & postlist_table);
data/xapian-core-1.4.17/backends/chert/chert_table.cc:1346:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		bool ok = bases[i].read(name, basenames[i], writable, err_msg);
data/xapian-core-1.4.17/backends/chert/chert_table.cc:1963:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    if (!base.read(name, base_letter, writable, err_msg)) {
data/xapian-core-1.4.17/backends/chert/chert_table.h:172:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(std::string * key) const {
data/xapian-core-1.4.17/backends/dbcheck.cc:215:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	version_file.read();
data/xapian-core-1.4.17/backends/dbcheck.cc:301:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	version_file.read();
data/xapian-core-1.4.17/backends/dbcheck.cc:355:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	version_file.read();
data/xapian-core-1.4.17/backends/flint_lock.cc:407:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(0, &ch, 1) != 0) {
data/xapian-core-1.4.17/backends/flint_lock.cc:429:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t n = read(fds[0], &ch, 1);
data/xapian-core-1.4.17/backends/glass/glass_check.cc:55:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    item.key().read(&key);
data/xapian-core-1.4.17/backends/glass/glass_check.cc:68:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    item.key().read(&key);
data/xapian-core-1.4.17/backends/glass/glass_cursor.cc:283:48:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    (void)LeafItem(C[0].get_p(), C[0].c).key().read(key);
data/xapian-core-1.4.17/backends/glass/glass_database.cc:236:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    version_file.read();
data/xapian-core-1.4.17/backends/glass/glass_database.cc:462:15:  [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 len = strlen(p);
data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc:276:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	version_file.read();
data/xapian-core-1.4.17/backends/glass/glass_databasereplicator.cc:344:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	version_file.read();
data/xapian-core-1.4.17/backends/glass/glass_table.h:146:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read(std::string * key) const {
data/xapian-core-1.4.17/backends/glass/glass_version.cc:96:15:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
GlassVersion::read()
data/xapian-core-1.4.17/backends/glass/glass_version.h:178:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    void read();
data/xapian-core-1.4.17/backends/uuids.cc:71:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    bool failed = (read(fd, buf, STRING_SIZE) != STRING_SIZE);
data/xapian-core-1.4.17/bin/xapian-inspect.cc:299:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    version_file.read();
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/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-core-1.4.17/common/io_utils.cc:127:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t c = read(fd, p, n);
data/xapian-core-1.4.17/common/io_utils.cc:209:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t c = read(fd, p, n);
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/common/pack.h:492:23:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    size_t len = std::strlen(ptr);
data/xapian-core-1.4.17/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-core-1.4.17/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-core-1.4.17/examples/quest.cc:148:15:  [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 len = strlen(i->s);
data/xapian-core-1.4.17/examples/quest.cc:164:15:  [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 len = strlen(i->s);
data/xapian-core-1.4.17/examples/quest.cc:180:15:  [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 len = strlen(i->s);
data/xapian-core-1.4.17/languages/compiler/driver.c:372:35:  [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).
            len = (dot == NULL) ? strlen(leaf) : (size_t)(dot - leaf);
data/xapian-core-1.4.17/languages/compiler/generator.c:303: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).
    int l = strlen(input);
data/xapian-core-1.4.17/languages/compiler/generator.c:1519: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).
        if (g->options->runtime_path[strlen(g->options->runtime_path) - 1] != '/')
data/xapian-core-1.4.17/languages/compiler/space.c:141: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).
    int n = strlen(s);
data/xapian-core-1.4.17/languages/compiler/tokeniser.c:32:22:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
            int ch = getc(input);
data/xapian-core-1.4.17/languages/compiler/tokeniser.c:94: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).
    int l = strlen(s);
data/xapian-core-1.4.17/net/remoteconnection.cc:160:21:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t received = read(fdin, buf, sizeof(buf));
data/xapian-core-1.4.17/net/remoteconnection.cc:454:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		res = read(fd, buf, sizeof(buf));
data/xapian-core-1.4.17/net/remoteconnection.cc:483:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
		    res = read(fd, buf, sizeof(buf));
data/xapian-core-1.4.17/queryparser/lemon.c:64:32:  [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).
#define lemonStrlen(X)   ((int)strlen(X))
data/xapian-core-1.4.17/queryparser/lemon.c:1553: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).
  output_filename = (char *) malloc( strlen(z)+1 );
data/xapian-core-1.4.17/queryparser/lemon.c:1566:45:  [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).
  output_header_filename = (char *) malloc( strlen(z)+1 );
data/xapian-core-1.4.17/queryparser/lemon.c:4683:16:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    nextChar = fgetc(in);
data/xapian-core-1.4.17/tests/api_backend.cc:59:24:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    mode_t old_umask = umask(022);
data/xapian-core-1.4.17/tests/api_backend.cc:70:2:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
	umask(old_umask);
data/xapian-core-1.4.17/tests/api_backend.cc:74:5:  [1] (access) umask:
  Ensure that umask is given most restrictive possible setting (e.g., 066 or
  077) (CWE-732).
    umask(old_umask);
data/xapian-core-1.4.17/tests/api_backend.cc:1234:9:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	while (read(fds[0], &ch, 1) < 0) { }
data/xapian-core-1.4.17/tests/api_backend.cc:1258:13:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    int r = read(fds[1], result, sizeof(result));
data/xapian-core-1.4.17/tests/api_backend.cc:1312:10:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    r = read(fds[1], result, sizeof(result));
data/xapian-core-1.4.17/tests/api_compact.cc:651:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t c = read(fd, buf, n);
data/xapian-core-1.4.17/tests/api_replicate.cc:79:14:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	ssize_t c = read(fd, p, desired);
data/xapian-core-1.4.17/tests/api_snippets.cc:277: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).
    size_t len = strlen(input);
data/xapian-core-1.4.17/tests/api_snippets.cc:289:11:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    len = strlen(input);
data/xapian-core-1.4.17/tests/api_snippets.cc:310:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:322:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:326:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:330:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:334:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:342:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:354:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:358:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:362:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:366:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:370:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:374:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:378:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:382:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:386:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:390:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:394:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:398:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:402:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:407:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:417:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:421:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:425:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:429:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:433:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:437:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:441:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:445:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:449:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:453:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:457:44:  [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).
    TEST_STRINGS_EQUAL(mset.snippet(input, strlen(input), stem),
data/xapian-core-1.4.17/tests/api_snippets.cc:510: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).
    size_t len = strlen(input);
data/xapian-core-1.4.17/tests/api_unicode.cc:96: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).
	size_t a_len = strlen(p->a);
data/xapian-core-1.4.17/tests/api_unicode.cc:99: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).
	size_t b_len = strlen(p->b);
data/xapian-core-1.4.17/tests/harness/testsuite.cc:353:18:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
	    ssize_t c = read(vg_log_fd, buf, sizeof(buf)); \
data/xapian-core-1.4.17/tests/harness/testsuite.cc:365:16:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			ssize_t c = read(vg_log_fd, buf, sizeof(buf));
data/xapian-core-1.4.17/unicode/utf8itor.cc:69: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).
    assign(p_, strlen(p_));

ANALYSIS SUMMARY:

Hits = 490
Lines analyzed = 188158 in approximately 4.90 seconds (38377 lines/second)
Physical Source Lines of Code (SLOC) = 131375
Hits@level = [0] 345 [1] 110 [2] 325 [3]  31 [4]  19 [5]   5
Hits@level+ = [0+] 835 [1+] 490 [2+] 380 [3+]  55 [4+]  24 [5+]   5
Hits/KSLOC@level+ = [0+] 6.35585 [1+] 3.72978 [2+] 2.89248 [3+] 0.418649 [4+] 0.182683 [5+] 0.038059
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.