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/fdb-5.7.0/src/fdb5/types/TypeAbbreviation.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeGrid.h Examining data/fdb-5.7.0/src/fdb5/types/TypeDefault.h Examining data/fdb-5.7.0/src/fdb5/types/TypeIgnore.h Examining data/fdb-5.7.0/src/fdb5/types/TypeParam.h Examining data/fdb-5.7.0/src/fdb5/types/TypeExpver.h Examining data/fdb-5.7.0/src/fdb5/types/TypeExpver.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeMonth.h Examining data/fdb-5.7.0/src/fdb5/types/TypeDate.h Examining data/fdb-5.7.0/src/fdb5/types/TypeTime.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeMonth.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeDouble.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeClimateMonthly.h Examining data/fdb-5.7.0/src/fdb5/types/TypeParam.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeTime.h Examining data/fdb-5.7.0/src/fdb5/types/TypeDouble.h Examining data/fdb-5.7.0/src/fdb5/types/TypesFactory.h Examining data/fdb-5.7.0/src/fdb5/types/TypeInteger.cc Examining data/fdb-5.7.0/src/fdb5/types/Type.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeIgnore.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeStep.h Examining data/fdb-5.7.0/src/fdb5/types/Type.h Examining data/fdb-5.7.0/src/fdb5/types/TypeDefault.cc Examining data/fdb-5.7.0/src/fdb5/types/TypesRegistry.h Examining data/fdb-5.7.0/src/fdb5/types/TypeAbbreviation.h Examining data/fdb-5.7.0/src/fdb5/types/TypeDate.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeInteger.h Examining data/fdb-5.7.0/src/fdb5/types/TypeClimateDaily.h Examining data/fdb-5.7.0/src/fdb5/types/TypeGrid.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeStep.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeClimateMonthly.cc Examining data/fdb-5.7.0/src/fdb5/types/TypesFactory.cc Examining data/fdb-5.7.0/src/fdb5/types/TypeClimateDaily.cc Examining data/fdb-5.7.0/src/fdb5/types/TypesRegistry.cc Examining data/fdb-5.7.0/src/fdb5/compat/grib2fdb5.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocIndexLocation.h Examining data/fdb-5.7.0/src/fdb5/toc/TocCommon.cc Examining data/fdb-5.7.0/src/fdb5/toc/FileSpaceHandler.h Examining data/fdb-5.7.0/src/fdb5/toc/BTreeIndex.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocIndexLocation.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogue.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogueReader.cc Examining data/fdb-5.7.0/src/fdb5/toc/ExpverFileSpaceHandler.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocPurgeVisitor.h Examining data/fdb-5.7.0/src/fdb5/toc/FileSpace.h Examining data/fdb-5.7.0/src/fdb5/toc/TocIndex.h Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.h Examining data/fdb-5.7.0/src/fdb5/toc/TocWipeVisitor.h Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogueReader.h Examining data/fdb-5.7.0/src/fdb5/toc/TocRecord.h Examining data/fdb-5.7.0/src/fdb5/toc/TocEngine.h Examining data/fdb-5.7.0/src/fdb5/toc/TocWipeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocStore.cc Examining data/fdb-5.7.0/src/fdb5/toc/EnvVarFileSpaceHandler.h Examining data/fdb-5.7.0/src/fdb5/toc/RootManager.cc Examining data/fdb-5.7.0/src/fdb5/toc/Root.h Examining data/fdb-5.7.0/src/fdb5/toc/RootManager.h Examining data/fdb-5.7.0/src/fdb5/toc/ExpverFileSpaceHandler.h Examining data/fdb-5.7.0/src/fdb5/toc/TocFieldLocation.cc Examining data/fdb-5.7.0/src/fdb5/toc/AdoptVisitor.h Examining data/fdb-5.7.0/src/fdb5/toc/FieldRef.h Examining data/fdb-5.7.0/src/fdb5/toc/TocStats.h Examining data/fdb-5.7.0/src/fdb5/toc/TocStats.cc Examining data/fdb-5.7.0/src/fdb5/toc/FileSpace.cc Examining data/fdb-5.7.0/src/fdb5/toc/Root.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocEngine.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocHandler.h Examining data/fdb-5.7.0/src/fdb5/toc/EnvVarFileSpaceHandler.cc Examining data/fdb-5.7.0/src/fdb5/toc/FieldRef.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocCommon.h Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocPurgeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/toc/FileSpaceHandler.cc Examining data/fdb-5.7.0/src/fdb5/toc/AdoptVisitor.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocRecord.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc Examining data/fdb-5.7.0/src/fdb5/toc/TocStore.h Examining data/fdb-5.7.0/src/fdb5/toc/TocIndex.cc Examining data/fdb-5.7.0/src/fdb5/toc/BTreeIndex.h Examining data/fdb-5.7.0/src/fdb5/toc/TocFieldLocation.h Examining data/fdb-5.7.0/src/fdb5/toc/TocCatalogue.h Examining data/fdb-5.7.0/src/fdb5/api/fdb_c.h Examining data/fdb-5.7.0/src/fdb5/api/DistFDB.cc Examining data/fdb-5.7.0/src/fdb5/api/FDBStats.h Examining data/fdb-5.7.0/src/fdb5/api/SelectFDB.h Examining data/fdb-5.7.0/src/fdb5/api/DistFDB.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/ControlIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/StatsIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/ListIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/PurgeIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/StatusIterator.cc Examining data/fdb-5.7.0/src/fdb5/api/helpers/DumpIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/ControlIterator.cc Examining data/fdb-5.7.0/src/fdb5/api/helpers/FDBToolRequest.cc Examining data/fdb-5.7.0/src/fdb5/api/helpers/FDBToolRequest.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/WipeIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/StatusIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/StatsIterator.cc Examining data/fdb-5.7.0/src/fdb5/api/helpers/ListIterator.cc Examining data/fdb-5.7.0/src/fdb5/api/helpers/APIIterator.h Examining data/fdb-5.7.0/src/fdb5/api/helpers/LockIterator.h Examining data/fdb-5.7.0/src/fdb5/api/LocalFDB.cc Examining data/fdb-5.7.0/src/fdb5/api/SelectFDB.cc Examining data/fdb-5.7.0/src/fdb5/api/RandomFDB.cc Examining data/fdb-5.7.0/src/fdb5/api/FDBStats.cc Examining data/fdb-5.7.0/src/fdb5/api/FDBFactory.cc Examining data/fdb-5.7.0/src/fdb5/api/LocalFDB.h Examining data/fdb-5.7.0/src/fdb5/api/FDBFactory.h Examining data/fdb-5.7.0/src/fdb5/api/local/QueueStringLogTarget.h Examining data/fdb-5.7.0/src/fdb5/api/local/QueryVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/ControlVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/WipeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/api/local/DumpVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/StatusVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/PurgeVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/StatsVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/WipeVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/PurgeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/api/local/ControlVisitor.cc Examining data/fdb-5.7.0/src/fdb5/api/local/ListVisitor.h Examining data/fdb-5.7.0/src/fdb5/api/local/StatsVisitor.cc Examining data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc Examining data/fdb-5.7.0/src/fdb5/api/FDB.cc Examining data/fdb-5.7.0/src/fdb5/api/fdb_c.cc Examining data/fdb-5.7.0/src/fdb5/api/FDB.h Examining data/fdb-5.7.0/src/fdb5/api/RemoteFDB.h Examining data/fdb-5.7.0/src/fdb5/config/Config.h Examining data/fdb-5.7.0/src/fdb5/config/Config.cc Examining data/fdb-5.7.0/src/fdb5/remote/RemoteConfiguration.cc Examining data/fdb-5.7.0/src/fdb5/remote/Messages.cc Examining data/fdb-5.7.0/src/fdb5/remote/Messages.h Examining data/fdb-5.7.0/src/fdb5/remote/FdbServer.h Examining data/fdb-5.7.0/src/fdb5/remote/RemoteFieldLocation.cc Examining data/fdb-5.7.0/src/fdb5/remote/fdb-monitor.cc Examining data/fdb-5.7.0/src/fdb5/remote/Handler.h Examining data/fdb-5.7.0/src/fdb5/remote/RemoteConfiguration.h Examining data/fdb-5.7.0/src/fdb5/remote/Handler.cc Examining data/fdb-5.7.0/src/fdb5/remote/RemoteFieldLocation.h Examining data/fdb-5.7.0/src/fdb5/remote/fdb-server.cc Examining data/fdb-5.7.0/src/fdb5/remote/AvailablePortList.cc Examining data/fdb-5.7.0/src/fdb5/remote/AvailablePortList.h Examining data/fdb-5.7.0/src/fdb5/remote/FdbServer.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBTool.h Examining data/fdb-5.7.0/src/fdb5/tools/FDBInspect.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-write.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-purge.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBLock.h Examining data/fdb-5.7.0/src/fdb5/tools/fdb-stats.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-dump-toc.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-schema.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-unlock.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBVisitTool.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-reconsolidate-toc.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-root.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-wipe.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-hammer.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-dump-index.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-where.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-hide.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBTool.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-patch.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-stats-new.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBInspect.h Examining data/fdb-5.7.0/src/fdb5/tools/fdb-dump.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-info.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-list.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBLock.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-read.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-overlay.cc Examining data/fdb-5.7.0/src/fdb5/tools/fdb-status.cc Examining data/fdb-5.7.0/src/fdb5/tools/FDBVisitTool.h Examining data/fdb-5.7.0/src/fdb5/tools/fdb-lock.cc Examining data/fdb-5.7.0/src/fdb5/rules/MatchValue.cc Examining data/fdb-5.7.0/src/fdb5/rules/Matcher.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchValue.h Examining data/fdb-5.7.0/src/fdb5/rules/Schema.h Examining data/fdb-5.7.0/src/fdb5/rules/Predicate.h Examining data/fdb-5.7.0/src/fdb5/rules/Predicate.cc Examining data/fdb-5.7.0/src/fdb5/rules/SchemaParser.cc Examining data/fdb-5.7.0/src/fdb5/rules/MatchHidden.cc Examining data/fdb-5.7.0/src/fdb5/rules/MatchOptional.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchHidden.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchAny.cc Examining data/fdb-5.7.0/src/fdb5/rules/SchemaParser.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchAlways.h Examining data/fdb-5.7.0/src/fdb5/rules/Rule.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchOptional.cc Examining data/fdb-5.7.0/src/fdb5/rules/MatchAny.h Examining data/fdb-5.7.0/src/fdb5/rules/MatchAlways.cc Examining data/fdb-5.7.0/src/fdb5/rules/Rule.cc Examining data/fdb-5.7.0/src/fdb5/rules/Schema.cc Examining data/fdb-5.7.0/src/fdb5/rules/Matcher.cc Examining data/fdb-5.7.0/src/fdb5/LibFdb5.h Examining data/fdb-5.7.0/src/fdb5/io/HandleGatherer.h Examining data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.h Examining data/fdb-5.7.0/src/fdb5/io/FDBFileHandle.h Examining data/fdb-5.7.0/src/fdb5/io/fdb5_lustreapi_file_create.c Examining data/fdb-5.7.0/src/fdb5/io/LustreFileHandle.cc Examining data/fdb-5.7.0/src/fdb5/io/FDBFileHandle.cc Examining data/fdb-5.7.0/src/fdb5/io/LustreFileHandle.h Examining data/fdb-5.7.0/src/fdb5/io/HandleGatherer.cc Examining data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.cc Examining data/fdb-5.7.0/src/fdb5/grib/GribIndexer.cc Examining data/fdb-5.7.0/src/fdb5/grib/GribArchiver.h Examining data/fdb-5.7.0/src/fdb5/grib/GribDecoder.h Examining data/fdb-5.7.0/src/fdb5/grib/GribIndexer.h Examining data/fdb-5.7.0/src/fdb5/grib/GribArchiver.cc Examining data/fdb-5.7.0/src/fdb5/grib/GribDecoder.cc Examining data/fdb-5.7.0/src/fdb5/LibFdb5.cc Examining data/fdb-5.7.0/src/fdb5/database/FieldDetails.h Examining data/fdb-5.7.0/src/fdb5/database/Archiver.h Examining data/fdb-5.7.0/src/fdb5/database/Report.cc Examining data/fdb-5.7.0/src/fdb5/database/Notifier.h Examining data/fdb-5.7.0/src/fdb5/database/MultiRetrieveVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/IndexStats.h Examining data/fdb-5.7.0/src/fdb5/database/Store.cc Examining data/fdb-5.7.0/src/fdb5/database/Field.cc Examining data/fdb-5.7.0/src/fdb5/database/WipeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/Key.h Examining data/fdb-5.7.0/src/fdb5/database/StatsReportVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/messageToKey.cc Examining data/fdb-5.7.0/src/fdb5/database/EntryVisitMechanism.cc Examining data/fdb-5.7.0/src/fdb5/database/IndexStats.cc Examining data/fdb-5.7.0/src/fdb5/database/Manager.h Examining data/fdb-5.7.0/src/fdb5/database/RetrieveVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/BaseArchiveVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/FieldLocation.cc Examining data/fdb-5.7.0/src/fdb5/database/Engine.h Examining data/fdb-5.7.0/src/fdb5/database/AxisRegistry.h Examining data/fdb-5.7.0/src/fdb5/database/UriStore.h Examining data/fdb-5.7.0/src/fdb5/database/AxisRegistry.cc Examining data/fdb-5.7.0/src/fdb5/database/ReadVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/Indexer.cc Examining data/fdb-5.7.0/src/fdb5/database/Report.h Examining data/fdb-5.7.0/src/fdb5/database/IndexLocation.cc Examining data/fdb-5.7.0/src/fdb5/database/messageToKey.h Examining data/fdb-5.7.0/src/fdb5/database/IndexFactory.cc Examining data/fdb-5.7.0/src/fdb5/database/DataStats.h Examining data/fdb-5.7.0/src/fdb5/database/Inspector.h Examining data/fdb-5.7.0/src/fdb5/database/Field.h Examining data/fdb-5.7.0/src/fdb5/database/RetrieveVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/DbStats.cc Examining data/fdb-5.7.0/src/fdb5/database/EntryVisitMechanism.h Examining data/fdb-5.7.0/src/fdb5/database/Store.h Examining data/fdb-5.7.0/src/fdb5/database/FieldLocation.h Examining data/fdb-5.7.0/src/fdb5/database/Index.h Examining data/fdb-5.7.0/src/fdb5/database/PurgeVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/WriteVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/FieldDetails.cc Examining data/fdb-5.7.0/src/fdb5/database/Key.cc Examining data/fdb-5.7.0/src/fdb5/database/Inspector.cc Examining data/fdb-5.7.0/src/fdb5/database/IndexFactory.h Examining data/fdb-5.7.0/src/fdb5/database/Catalogue.h Examining data/fdb-5.7.0/src/fdb5/database/ReadVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/WipeVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/IndexAxis.h Examining data/fdb-5.7.0/src/fdb5/database/BaseArchiveVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/ArchiveVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/DataStats.cc Examining data/fdb-5.7.0/src/fdb5/database/Notifier.cc Examining data/fdb-5.7.0/src/fdb5/database/PurgeVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/WriteVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/DB.cc Examining data/fdb-5.7.0/src/fdb5/database/DbStats.h Examining data/fdb-5.7.0/src/fdb5/database/DB.h Examining data/fdb-5.7.0/src/fdb5/database/StatsReportVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/UriStore.cc Examining data/fdb-5.7.0/src/fdb5/database/Engine.cc Examining data/fdb-5.7.0/src/fdb5/database/Manager.cc Examining data/fdb-5.7.0/src/fdb5/database/MultiRetrieveVisitor.cc Examining data/fdb-5.7.0/src/fdb5/database/Index.cc Examining data/fdb-5.7.0/src/fdb5/database/Catalogue.cc Examining data/fdb-5.7.0/src/fdb5/database/IndexAxis.cc Examining data/fdb-5.7.0/src/fdb5/database/Indexer.h Examining data/fdb-5.7.0/src/fdb5/database/ArchiveVisitor.h Examining data/fdb-5.7.0/src/fdb5/database/IndexLocation.h Examining data/fdb-5.7.0/src/fdb5/database/Archiver.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PIndexRoot.h Examining data/fdb-5.7.0/src/fdb5/pmem/PBaseNode.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemEngine.h Examining data/fdb-5.7.0/src/fdb5/pmem/DataPool.cc Examining data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemIndexLocation.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemIndex.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemFieldLocation.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDBWriter.h Examining data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDBWriter.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PDataRoot.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemIndexLocation.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDBReader.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PRoot.h Examining data/fdb-5.7.0/src/fdb5/pmem/PDataNode.cc Examining data/fdb-5.7.0/src/fdb5/pmem/DataPool.h Examining data/fdb-5.7.0/src/fdb5/pmem/Pool.h Examining data/fdb-5.7.0/src/fdb5/pmem/PoolEntry.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemEngine.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PDataNode.h Examining data/fdb-5.7.0/src/fdb5/pmem/PoolManager.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDBReader.h Examining data/fdb-5.7.0/src/fdb5/pmem/Pool.cc Examining data/fdb-5.7.0/src/fdb5/pmem/DataPoolManager.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemStats.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemStats.h Examining data/fdb-5.7.0/src/fdb5/pmem/PBaseNode.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PoolManager.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PBranchingNode.h Examining data/fdb-5.7.0/src/fdb5/pmem/PDataRoot.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDB.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemDB.h Examining data/fdb-5.7.0/src/fdb5/pmem/PoolEntry.h Examining data/fdb-5.7.0/src/fdb5/pmem/PMemFieldLocation.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PIndexRoot.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PMemIndex.h Examining data/fdb-5.7.0/src/fdb5/pmem/PoolGroup.cc Examining data/fdb-5.7.0/src/fdb5/pmem/PoolGroup.h Examining data/fdb-5.7.0/src/fdb5/pmem/PRoot.cc Examining data/fdb-5.7.0/src/fdb5/pmem/DataPoolManager.h Examining data/fdb-5.7.0/src/fdb5/pmem/PBranchingNode.cc Examining data/fdb-5.7.0/src/fdb5/rados/RadosFieldLocation.h Examining data/fdb-5.7.0/src/fdb5/rados/RadosStore.h Examining data/fdb-5.7.0/src/fdb5/rados/RadosFieldLocation.cc Examining data/fdb-5.7.0/src/fdb5/rados/RadosStore.cc Examining data/fdb-5.7.0/tests/fdb/api/ApiSpy.h Examining data/fdb-5.7.0/tests/fdb/api/test_config.cc Examining data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc Examining data/fdb-5.7.0/tests/fdb/api/test_select.cc Examining data/fdb-5.7.0/tests/fdb/api/test_dist.cc Examining data/fdb-5.7.0/tests/fdb/test_fdb5_service.cc Examining data/fdb-5.7.0/tests/fdb/pmem/test_pbasenode.cc Examining data/fdb-5.7.0/tests/fdb/pmem/test_pdatanode.cc Examining data/fdb-5.7.0/tests/fdb/pmem/test_persistent_helpers.h Examining data/fdb-5.7.0/tests/fdb/pmem/test_pool_manager.cc Examining data/fdb-5.7.0/tests/fdb/pmem/test_pbranchingnode.cc FINAL RESULTS: data/fdb-5.7.0/src/fdb5/LibFdb5.h:29:31: [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. class LibFdb5 : public eckit::system::Library { data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:107:13: [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(str_, s.c_str()); data/fdb-5.7.0/src/fdb5/database/MultiRetrieveVisitor.cc:63:26: [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. db_ = databases_.access(key); data/fdb-5.7.0/src/fdb5/config/Config.cc:72:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char* config_str = ::getenv("FDB5_CONFIG"); data/fdb-5.7.0/src/fdb5/remote/FdbServer.cc:44:7: [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(::getpid() + ::time(nullptr)); data/fdb-5.7.0/src/fdb5/remote/FdbServer.cc:45:7: [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(::getpid() + ::time(nullptr)); data/fdb-5.7.0/src/fdb5/toc/EnvVarFileSpaceHandler.cc:51:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* value = ::getenv(fdbFileSpaceSHandlerEnvVarName_.c_str()); data/fdb-5.7.0/src/fdb5/toc/FileSpaceHandler.cc:148:41: [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. static FileSpaceHandlerRegister<Random> random("Random"); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:126:36: [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* subTocOverride = ::getenv("FDB5_SUB_TOCS"); data/fdb-5.7.0/tests/fdb/pmem/test_persistent_helpers.h:39: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. const char* tmpdir = ::getenv("TMPDIR"); data/fdb-5.7.0/tests/fdb/pmem/test_persistent_helpers.h:41:24: [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. tmpdir = ::getenv("SCRATCHDIR"); data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:1013: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(pos, ¤tBuffer_[pos_], read); data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:122: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). long open() { data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:394: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). tmp = dr->open(); data/fdb-5.7.0/src/fdb5/database/Catalogue.h:91: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). virtual bool open() = 0; data/fdb-5.7.0/src/fdb5/database/DB.cc:114: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 DB::open() { data/fdb-5.7.0/src/fdb5/database/DB.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). bool ret = catalogue_->open(); data/fdb-5.7.0/src/fdb5/database/DB.cc:119: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). return store().open(); data/fdb-5.7.0/src/fdb5/database/DB.h:61: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(); data/fdb-5.7.0/src/fdb5/database/EntryVisitMechanism.cc:110: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). ASSERT(db->open()); data/fdb-5.7.0/src/fdb5/database/Index.cc:106: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). virtual void open() { NOTIMP; } data/fdb-5.7.0/src/fdb5/database/Index.h:68: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). virtual void open() = 0; data/fdb-5.7.0/src/fdb5/database/Index.h:141: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() { return content_->open(); } data/fdb-5.7.0/src/fdb5/database/Index.h:141: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). void open() { return content_->open(); } data/fdb-5.7.0/src/fdb5/database/Manager.cc:95: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 line[1024]; data/fdb-5.7.0/src/fdb5/database/MultiRetrieveVisitor.cc:82: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 (!newDB->open()) { data/fdb-5.7.0/src/fdb5/database/RetrieveVisitor.cc:59: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). if (!db_->open()) { data/fdb-5.7.0/src/fdb5/database/Store.h:45: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). virtual bool open() = 0; data/fdb-5.7.0/src/fdb5/io/FDBFileHandle.cc:50:15: [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_ = ::fopen(path_.c_str(), "a"); data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.cc:76:15: [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_ = ::fopen(name_.localPath(), "r"); data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.cc:128: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(*buffer_, messageBuffer, messageSize); data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.cc:137: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(buffer, &(*buffer_)[pos_], readLength); data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.cc:57: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(tmp, buffer_, size_); data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.cc:62: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(buffer_ + position_, buffer, length); data/fdb-5.7.0/src/fdb5/pmem/PDataNode.cc:43: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(data_, data, length_); data/fdb-5.7.0/src/fdb5/pmem/PDataNode.h:72: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_[8]; data/fdb-5.7.0/src/fdb5/pmem/PMemDB.cc:102: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). bool PMemDB::open() { data/fdb-5.7.0/src/fdb5/pmem/PMemDB.h:68: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() override; data/fdb-5.7.0/src/fdb5/pmem/PMemDBReader.cc:41:20: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool PMemDBReader::open() { data/fdb-5.7.0/src/fdb5/pmem/PMemDBReader.cc:47: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). return PMemDB::open(); data/fdb-5.7.0/src/fdb5/pmem/PMemDBReader.h:39: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). virtual bool open(); data/fdb-5.7.0/src/fdb5/pmem/PMemIndex.cc:71: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). void PMemIndex::open() { data/fdb-5.7.0/src/fdb5/pmem/PMemIndex.h:56: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). virtual void open(); data/fdb-5.7.0/src/fdb5/pmem/PoolManager.cc:63: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 line[1024]; data/fdb-5.7.0/src/fdb5/pmem/PoolManager.cc:142: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 line[1024]; data/fdb-5.7.0/src/fdb5/rados/RadosStore.h:40: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() override { return true; } data/fdb-5.7.0/src/fdb5/remote/AvailablePortList.cc:60: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/ExpverFileSpaceHandler.cc:55: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/ExpverFileSpaceHandler.cc:109: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 line[4*1024]; data/fdb-5.7.0/src/fdb5/toc/RootManager.cc:250: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/RootManager.cc:313: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/RootManager.cc:384: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/RootManager.cc:428: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 line[1024]; data/fdb-5.7.0/src/fdb5/toc/TocCatalogueReader.cc:80:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool TocCatalogueReader::open() { data/fdb-5.7.0/src/fdb5/toc/TocCatalogueReader.cc:116:37: [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). const_cast<Index&>(idx).open(); data/fdb-5.7.0/src/fdb5/toc/TocCatalogueReader.h:45: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() override; data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc:69: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). current_.open(); data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc:91:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). currentFull_.open(); data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc:103:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). bool TocCatalogueWriter::open() { data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.h:64: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() override; data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:233:23: [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). SYSCALL2((fd_ = ::open( tocPath_.localPath(), iomode, (mode_t)0777 )), tocPath_); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:260:23: [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). SYSCALL2((fd_ = ::open( tocPath_.localPath(), iomode )), tocPath_ ); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:658:22: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). SYSCALL2(fd_ = ::open( tocPath_.localPath(), iomode, mode_t(0777) ), tocPath_); data/fdb-5.7.0/src/fdb5/toc/TocIndex.cc:32:43: [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). const_cast<TocIndex&>(index_).open(); data/fdb-5.7.0/src/fdb5/toc/TocIndex.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). void TocIndex::open() { data/fdb-5.7.0/src/fdb5/toc/TocIndex.cc:115: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). open(); data/fdb-5.7.0/src/fdb5/toc/TocIndex.h:86: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() override; data/fdb-5.7.0/src/fdb5/toc/TocRecord.h:55: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. unsigned char spare_[3]; /// padding data/fdb-5.7.0/src/fdb5/toc/TocRecord.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 payload_[maxPayloadSize]; data/fdb-5.7.0/src/fdb5/toc/TocStore.h:44: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() override { return true; } data/fdb-5.7.0/src/fdb5/tools/fdb-schema.cc:57: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). ASSERT(db->open()); data/fdb-5.7.0/src/fdb5/tools/fdb-stats-new.cc:65: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). ASSERT(db->open()); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:176: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[1000]; data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:177: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 grib[4]; data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:203: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[1000]; data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:204: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 grib[4]; data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:465:34: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read = controlClient_.read(data, length); data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:466:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (length != read) { data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:468:71: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ss << "Read error. Expected " << length << " bytes, read " << read; data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:495:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read = dataClient_.read(data, length); data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:496:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (length != read) { data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:498:71: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ss << "Read error. Expected " << length << " bytes, read " << read; data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:962:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long read(void* pos, long sz) override { data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:1013:46: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ::memcpy(pos, ¤tBuffer_[pos_], read); data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:1014:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pos_ += read; data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:1015:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). overallPosition_ += read; data/fdb-5.7.0/src/fdb5/api/RemoteFDB.cc:1026:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read; data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:142:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long read(void* buf, long length) { data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:144:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return dh_->read(buf, length); data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:424:76: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int fdb_datareader_read(fdb_datareader_t* dr, void *buf, long count, long* read) { data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:425:45: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return wrapApiFunction([dr, buf, count, read]{ data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:428:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ASSERT(read); data/fdb-5.7.0/src/fdb5/api/fdb_c.cc:429:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *read = dr->read(buf, count); data/fdb-5.7.0/src/fdb5/api/fdb_c.h:137:76: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int fdb_datareader_read(fdb_datareader_t* dr, void *buf, long count, long* read); data/fdb-5.7.0/src/fdb5/config/Config.cc:191:16: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t Config::umask() const { data/fdb-5.7.0/src/fdb5/config/Config.h:52:12: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). mode_t umask() const; data/fdb-5.7.0/src/fdb5/database/Catalogue.cc:83:95: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::unique_ptr<Catalogue> CatalogueFactory::build(const Key& key, const Config& config, bool read) { data/fdb-5.7.0/src/fdb5/database/Catalogue.cc:87:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nameLowercase += read ? ".reader" : ".writer"; data/fdb-5.7.0/src/fdb5/database/Catalogue.cc:105:108: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::unique_ptr<Catalogue> CatalogueFactory::build(const eckit::URI& uri, const fdb5::Config& config, bool read) { data/fdb-5.7.0/src/fdb5/database/Catalogue.cc:109:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). nameLowercase += read ? ".reader" : ".writer"; data/fdb-5.7.0/src/fdb5/database/Catalogue.h:166:81: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::unique_ptr<Catalogue> build(const Key& key, const Config& config, bool read); data/fdb-5.7.0/src/fdb5/database/Catalogue.h:167:88: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). std::unique_ptr<Catalogue> build(const eckit::URI& uri, const Config& config, bool read); data/fdb-5.7.0/src/fdb5/database/DB.cc:36:57: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DB::DB(const Key& key, const fdb5::Config& config, bool read) : config_(config) { data/fdb-5.7.0/src/fdb5/database/DB.cc:37:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). catalogue_ = CatalogueFactory::instance().build(key, config, read); data/fdb-5.7.0/src/fdb5/database/DB.cc:40:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DB::DB(const eckit::URI& uri, const fdb5::Config& config, bool read) : config_(config) { data/fdb-5.7.0/src/fdb5/database/DB.cc:41:66: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). catalogue_ = CatalogueFactory::instance().build(uri, config, read); data/fdb-5.7.0/src/fdb5/database/DB.h:100:57: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DB(const Key &key, const fdb5::Config& config, bool read); data/fdb-5.7.0/src/fdb5/database/DB.h:101:64: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). DB(const eckit::URI &uri, const fdb5::Config& config, bool read); data/fdb-5.7.0/src/fdb5/database/Key.cc:333:22: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. eckit::StringSet mismatch; data/fdb-5.7.0/src/fdb5/database/Key.cc:345:17: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. mismatch.insert((*j).first + "=" + j->second + " and " + k->second); data/fdb-5.7.0/src/fdb5/database/Key.cc:350:27: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if (missing.size() || mismatch.size()) { data/fdb-5.7.0/src/fdb5/database/Key.cc:357:12: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. if(mismatch.size()) { data/fdb-5.7.0/src/fdb5/database/Key.cc:358:43: [1] (buffer) mismatch: Function does not check the second iterator for over-read conditions (CWE-126). This function is often discouraged by most C++ coding standards in favor of its safer alternatives provided since C++14. Consider using a form of this function that checks the second iterator before potentially overflowing it. oss << "Values mismatch: " << mismatch << " "; data/fdb-5.7.0/src/fdb5/io/FDBFileHandle.cc:58:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long FDBFileHandle::read(void*, long) { data/fdb-5.7.0/src/fdb5/io/FDBFileHandle.h:43:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(void *, long); data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.cc:88:37: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long SingleGribMungePartFileHandle::read(void* buffer, long length) { data/fdb-5.7.0/src/fdb5/io/SingleGribMungePartFileHandle.h:53:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long read(void*,long) override; data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.cc:40:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long MemoryBufferStream::read(void* buffer, long length) { data/fdb-5.7.0/src/fdb5/pmem/MemoryBufferStream.h:45:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual long read(void*,long); data/fdb-5.7.0/src/fdb5/pmem/PIndexRoot.cc:68:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). schemaFile->read(&buf[0], buf.size()); data/fdb-5.7.0/src/fdb5/remote/Handler.cc:376:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(hdr); data/fdb-5.7.0/src/fdb5/remote/Handler.cc:453:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read = socket.read(data, length); data/fdb-5.7.0/src/fdb5/remote/Handler.cc:454:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (length != read) { data/fdb-5.7.0/src/fdb5/remote/Handler.cc:456:71: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ss << "Read error. Expected " << length << " bytes, read " << read; data/fdb-5.7.0/src/fdb5/remote/Handler.cc:757:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void RemoteHandler::read(const MessageHeader& hdr) { data/fdb-5.7.0/src/fdb5/remote/Handler.cc:788:32: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((dataRead = dh->read(writeBuffer, writeBuffer.size())) != 0) { data/fdb-5.7.0/src/fdb5/remote/Handler.h:95:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). void read(const MessageHeader& hdr); data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc:34:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_(config.umask()) { data/fdb-5.7.0/src/fdb5/toc/TocCatalogueWriter.cc:42:19: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask_(config.umask()) { data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:71:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long read(void* buf, long len) { data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:73:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return cached_->read(buf, len); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:76:31: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). SYSCALL2( ret = ::read(fd_, buf, len), path_); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:435:22: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long len = proxy.read(&r, sizeof(TocRecord::Header)); data/fdb-5.7.0/src/fdb5/toc/TocHandler.cc:441:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = proxy.read(&r.payload_, r.header_.size_ - sizeof(TocRecord::Header)); data/fdb-5.7.0/tests/fdb/api/ApiSpy.h:65:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). long read(void*,long) override { NOTIMP; } data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:63:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dh->read(buf1, length); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:109:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dh->read(buf2, length); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:151:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dh->read(buf3, length); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:212:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_read(dr, grib, 4, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:213:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(4, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:215:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_tell(dr, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:216:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(4, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:218:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_tell(dr, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:219:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(3, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:221:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_tell(dr, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:222:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(6, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:223:41: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_read(dr, buf, 1000, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:224:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(1000, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:225:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_tell(dr, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:226:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(1006, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:237:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_read(dr, grib, 4, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:238:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(4, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:240:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_tell(dr, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:241:26: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(4+size, read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:243:39: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fdb_datareader_read(dr, grib, 4, &read); data/fdb-5.7.0/tests/fdb/api/test_fdb_c.cc:244:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). EXPECT_EQUAL(0, read); data/fdb-5.7.0/tests/fdb/test_fdb5_service.cc:173:29: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). dh->read(buffer, buffer.size()); ANALYSIS SUMMARY: Hits = 157 Lines analyzed = 41196 in approximately 0.97 seconds (42253 lines/second) Physical Source Lines of Code (SLOC) = 23284 Hits@level = [0] 1 [1] 81 [2] 65 [3] 8 [4] 3 [5] 0 Hits@level+ = [0+] 158 [1+] 157 [2+] 76 [3+] 11 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 6.78578 [1+] 6.74283 [2+] 3.26404 [3+] 0.472427 [4+] 0.128844 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.