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/proj-7.2.0/test/unit/test_metadata.cpp Examining data/proj-7.2.0/test/unit/test_crs.cpp Examining data/proj-7.2.0/test/unit/proj_errno_string_test.cpp Examining data/proj-7.2.0/test/unit/test_primitives.hpp Examining data/proj-7.2.0/test/unit/proj_angular_io_test.cpp Examining data/proj-7.2.0/test/unit/test_common.cpp Examining data/proj-7.2.0/test/unit/test_datum.cpp Examining data/proj-7.2.0/test/unit/test_network.cpp Examining data/proj-7.2.0/test/unit/gtest_include.h Examining data/proj-7.2.0/test/unit/pj_transform_test.cpp Examining data/proj-7.2.0/test/unit/include_proj_h_from_c.c Examining data/proj-7.2.0/test/unit/proj_context_test.cpp Examining data/proj-7.2.0/test/unit/test_util.cpp Examining data/proj-7.2.0/test/unit/test_factory.cpp Examining data/proj-7.2.0/test/unit/test_grids.cpp Examining data/proj-7.2.0/test/unit/test_io.cpp Examining data/proj-7.2.0/test/unit/test_operation.cpp Examining data/proj-7.2.0/test/unit/gie_self_tests.cpp Examining data/proj-7.2.0/test/unit/test_tinshift.cpp Examining data/proj-7.2.0/test/unit/test_defmodel.cpp Examining data/proj-7.2.0/test/unit/main.cpp Examining data/proj-7.2.0/test/unit/test_c_api.cpp Examining data/proj-7.2.0/test/unit/pj_phi2_test.cpp Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-death-test.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-spi.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-linked_ptr.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-string.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-death-test-internal.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port-arch.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-internal.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-param-util-generated.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-param-util.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-type-util.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-filepath.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/custom/gtest-port.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/custom/gtest.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/custom/gtest-printers.h Examining data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-tuple.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-message.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-param-test.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-typed-test.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest_pred_impl.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest_prod.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-test-part.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest.h Examining data/proj-7.2.0/test/googletest/include/gtest/gtest-printers.h Examining data/proj-7.2.0/test/googletest/src/gtest-test-part.cc Examining data/proj-7.2.0/test/googletest/src/gtest.cc Examining data/proj-7.2.0/test/googletest/src/gtest_main.cc Examining data/proj-7.2.0/test/googletest/src/gtest-internal-inl.h Examining data/proj-7.2.0/test/googletest/src/gtest-death-test.cc Examining data/proj-7.2.0/test/googletest/src/gtest-port.cc Examining data/proj-7.2.0/test/googletest/src/gtest-printers.cc Examining data/proj-7.2.0/test/googletest/src/gtest-typed-test.cc Examining data/proj-7.2.0/test/googletest/src/gtest-all.cc Examining data/proj-7.2.0/test/googletest/src/gtest-filepath.cc Examining data/proj-7.2.0/include/proj/coordinatesystem.hpp Examining data/proj-7.2.0/include/proj/nn.hpp Examining data/proj-7.2.0/include/proj/io.hpp Examining data/proj-7.2.0/include/proj/internal/coordinateoperation_internal.hpp Examining data/proj-7.2.0/include/proj/internal/coordinateoperation_constants.hpp Examining data/proj-7.2.0/include/proj/internal/esri_projection_mappings.hpp Examining data/proj-7.2.0/include/proj/internal/internal.hpp Examining data/proj-7.2.0/include/proj/internal/coordinatesystem_internal.hpp Examining data/proj-7.2.0/include/proj/internal/tracing.hpp Examining data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp Examining data/proj-7.2.0/include/proj/internal/lru_cache.hpp Examining data/proj-7.2.0/include/proj/internal/io_internal.hpp Examining data/proj-7.2.0/include/proj/internal/include_nlohmann_json.hpp Examining data/proj-7.2.0/include/proj/metadata.hpp Examining data/proj-7.2.0/include/proj/datum.hpp Examining data/proj-7.2.0/include/proj/coordinateoperation.hpp Examining data/proj-7.2.0/include/proj/common.hpp Examining data/proj-7.2.0/include/proj/util.hpp Examining data/proj-7.2.0/include/proj/crs.hpp Examining data/proj-7.2.0/src/factors.cpp Examining data/proj-7.2.0/src/units.cpp Examining data/proj-7.2.0/src/geodesic.h Examining data/proj-7.2.0/src/release.cpp Examining data/proj-7.2.0/src/quadtree.hpp Examining data/proj-7.2.0/src/tsfn.cpp Examining data/proj-7.2.0/src/mutex.cpp Examining data/proj-7.2.0/src/proj_api.h Examining data/proj-7.2.0/src/log.cpp Examining data/proj-7.2.0/src/utils.cpp Examining data/proj-7.2.0/src/wkt_parser.cpp Examining data/proj-7.2.0/src/ell_set.cpp Examining data/proj-7.2.0/src/iso19111/common.cpp Examining data/proj-7.2.0/src/iso19111/util.cpp Examining data/proj-7.2.0/src/iso19111/crs.cpp Examining data/proj-7.2.0/src/iso19111/coordinateoperation.cpp Examining data/proj-7.2.0/src/iso19111/c_api.cpp Examining data/proj-7.2.0/src/iso19111/io.cpp Examining data/proj-7.2.0/src/iso19111/internal.cpp Examining data/proj-7.2.0/src/iso19111/datum.cpp Examining data/proj-7.2.0/src/iso19111/metadata.cpp Examining data/proj-7.2.0/src/iso19111/factory.cpp Examining data/proj-7.2.0/src/iso19111/static.cpp Examining data/proj-7.2.0/src/iso19111/coordinatesystem.cpp Examining data/proj-7.2.0/src/transformations/horner.cpp Examining data/proj-7.2.0/src/transformations/molodensky.cpp Examining data/proj-7.2.0/src/transformations/tinshift.cpp Examining data/proj-7.2.0/src/transformations/defmodel.cpp Examining data/proj-7.2.0/src/transformations/xyzgridshift.cpp Examining data/proj-7.2.0/src/transformations/tinshift.hpp Examining data/proj-7.2.0/src/transformations/defmodel.hpp Examining data/proj-7.2.0/src/transformations/tinshift_exceptions.hpp Examining data/proj-7.2.0/src/transformations/affine.cpp Examining data/proj-7.2.0/src/transformations/defmodel_impl.hpp Examining data/proj-7.2.0/src/transformations/deformation.cpp Examining data/proj-7.2.0/src/transformations/helmert.cpp Examining data/proj-7.2.0/src/transformations/hgridshift.cpp Examining data/proj-7.2.0/src/transformations/vgridshift.cpp Examining data/proj-7.2.0/src/transformations/defmodel_exceptions.hpp Examining data/proj-7.2.0/src/transformations/tinshift_impl.hpp Examining data/proj-7.2.0/src/gauss.cpp Examining data/proj-7.2.0/src/fileapi.cpp Examining data/proj-7.2.0/src/proj_constants.h Examining data/proj-7.2.0/src/ellps.cpp Examining data/proj-7.2.0/src/datums.cpp Examining data/proj-7.2.0/src/conversions/geoc.cpp Examining data/proj-7.2.0/src/conversions/noop.cpp Examining data/proj-7.2.0/src/conversions/set.cpp Examining data/proj-7.2.0/src/conversions/unitconvert.cpp Examining data/proj-7.2.0/src/conversions/geocent.cpp Examining data/proj-7.2.0/src/conversions/axisswap.cpp Examining data/proj-7.2.0/src/conversions/cart.cpp Examining data/proj-7.2.0/src/wkt1_generated_parser.c Examining data/proj-7.2.0/src/adjlon.cpp Examining data/proj-7.2.0/src/strerrno.cpp Examining data/proj-7.2.0/src/aasincos.cpp Examining data/proj-7.2.0/src/zpoly1.cpp Examining data/proj-7.2.0/src/phi2.cpp Examining data/proj-7.2.0/src/grids.cpp Examining data/proj-7.2.0/src/pr_list.cpp Examining data/proj-7.2.0/src/proj_mdist.cpp Examining data/proj-7.2.0/src/tests/test228.cpp Examining data/proj-7.2.0/src/tests/multistresstest.cpp Examining data/proj-7.2.0/src/tests/geodtest.cpp Examining data/proj-7.2.0/src/proj.h Examining data/proj-7.2.0/src/tracing.cpp Examining data/proj-7.2.0/src/wkt2_parser.h Examining data/proj-7.2.0/src/filemanager.cpp Examining data/proj-7.2.0/src/pj_list.h Examining data/proj-7.2.0/src/strtod.cpp Examining data/proj-7.2.0/src/mlfn.hpp Examining data/proj-7.2.0/src/proj_json_streaming_writer.hpp Examining data/proj-7.2.0/src/sqlite3_utils.hpp Examining data/proj-7.2.0/src/wkt2_parser.cpp Examining data/proj-7.2.0/src/4D_api.cpp Examining data/proj-7.2.0/src/inv.cpp Examining data/proj-7.2.0/src/pipeline.cpp Examining data/proj-7.2.0/src/malloc.cpp Examining data/proj-7.2.0/src/projections/gall.cpp Examining data/proj-7.2.0/src/projections/misrsom.cpp Examining data/proj-7.2.0/src/projections/gstmerc.cpp Examining data/proj-7.2.0/src/projections/geos.cpp Examining data/proj-7.2.0/src/projections/mbt_fps.cpp Examining data/proj-7.2.0/src/projections/bertin1953.cpp Examining data/proj-7.2.0/src/projections/hammer.cpp Examining data/proj-7.2.0/src/projections/bacon.cpp Examining data/proj-7.2.0/src/projections/gn_sinu.cpp Examining data/proj-7.2.0/src/projections/natearth2.cpp Examining data/proj-7.2.0/src/projections/fahey.cpp Examining data/proj-7.2.0/src/projections/igh.cpp Examining data/proj-7.2.0/src/projections/nzmg.cpp Examining data/proj-7.2.0/src/projections/rouss.cpp Examining data/proj-7.2.0/src/projections/tmerc.cpp Examining data/proj-7.2.0/src/projections/rpoly.cpp Examining data/proj-7.2.0/src/projections/cc.cpp Examining data/proj-7.2.0/src/projections/aeqd.cpp Examining data/proj-7.2.0/src/projections/vandg.cpp Examining data/proj-7.2.0/src/projections/ocea.cpp Examining data/proj-7.2.0/src/projections/oea.cpp Examining data/proj-7.2.0/src/projections/col_urban.cpp Examining data/proj-7.2.0/src/projections/stere.cpp Examining data/proj-7.2.0/src/projections/lcc.cpp Examining data/proj-7.2.0/src/projections/calcofi.cpp Examining data/proj-7.2.0/src/projections/tpeqd.cpp Examining data/proj-7.2.0/src/projections/gnom.cpp Examining data/proj-7.2.0/src/projections/ob_tran.cpp Examining data/proj-7.2.0/src/projections/urm5.cpp Examining data/proj-7.2.0/src/projections/boggs.cpp Examining data/proj-7.2.0/src/projections/august.cpp Examining data/proj-7.2.0/src/projections/krovak.cpp Examining data/proj-7.2.0/src/projections/poly.cpp Examining data/proj-7.2.0/src/projections/healpix.cpp Examining data/proj-7.2.0/src/projections/imw_p.cpp Examining data/proj-7.2.0/src/projections/somerc.cpp Examining data/proj-7.2.0/src/projections/patterson.cpp Examining data/proj-7.2.0/src/projections/mod_ster.cpp Examining data/proj-7.2.0/src/projections/times.cpp Examining data/proj-7.2.0/src/projections/bipc.cpp Examining data/proj-7.2.0/src/projections/bonne.cpp Examining data/proj-7.2.0/src/projections/denoy.cpp Examining data/proj-7.2.0/src/projections/larr.cpp Examining data/proj-7.2.0/src/projections/tcc.cpp Examining data/proj-7.2.0/src/projections/laea.cpp Examining data/proj-7.2.0/src/projections/eck2.cpp Examining data/proj-7.2.0/src/projections/goode.cpp Examining data/proj-7.2.0/src/projections/wink1.cpp Examining data/proj-7.2.0/src/projections/nicol.cpp Examining data/proj-7.2.0/src/projections/eqearth.cpp Examining data/proj-7.2.0/src/projections/eck3.cpp Examining data/proj-7.2.0/src/projections/nell_h.cpp Examining data/proj-7.2.0/src/projections/tcea.cpp Examining data/proj-7.2.0/src/projections/putp4p.cpp Examining data/proj-7.2.0/src/projections/omerc.cpp Examining data/proj-7.2.0/src/projections/mill.cpp Examining data/proj-7.2.0/src/projections/mbtfpq.cpp Examining data/proj-7.2.0/src/projections/lsat.cpp Examining data/proj-7.2.0/src/projections/sterea.cpp Examining data/proj-7.2.0/src/projections/eck1.cpp Examining data/proj-7.2.0/src/projections/collg.cpp Examining data/proj-7.2.0/src/projections/gins8.cpp Examining data/proj-7.2.0/src/projections/ccon.cpp Examining data/proj-7.2.0/src/projections/wink2.cpp Examining data/proj-7.2.0/src/projections/ortho.cpp Examining data/proj-7.2.0/src/projections/mbtfpp.cpp Examining data/proj-7.2.0/src/projections/labrd.cpp Examining data/proj-7.2.0/src/projections/eck4.cpp Examining data/proj-7.2.0/src/projections/lask.cpp Examining data/proj-7.2.0/src/projections/eck5.cpp Examining data/proj-7.2.0/src/projections/adams.cpp Examining data/proj-7.2.0/src/projections/moll.cpp Examining data/proj-7.2.0/src/projections/crast.cpp Examining data/proj-7.2.0/src/projections/fouc_s.cpp Examining data/proj-7.2.0/src/projections/urmfps.cpp Examining data/proj-7.2.0/src/projections/latlong.cpp Examining data/proj-7.2.0/src/projections/qsc.cpp Examining data/proj-7.2.0/src/projections/nell.cpp Examining data/proj-7.2.0/src/projections/eqc.cpp Examining data/proj-7.2.0/src/projections/comill.cpp Examining data/proj-7.2.0/src/projections/lagrng.cpp Examining data/proj-7.2.0/src/projections/natearth.cpp Examining data/proj-7.2.0/src/projections/putp5.cpp Examining data/proj-7.2.0/src/projections/lcca.cpp Examining data/proj-7.2.0/src/projections/cea.cpp Examining data/proj-7.2.0/src/projections/wag3.cpp Examining data/proj-7.2.0/src/projections/sch.cpp Examining data/proj-7.2.0/src/projections/aea.cpp Examining data/proj-7.2.0/src/projections/hatano.cpp Examining data/proj-7.2.0/src/projections/vandg2.cpp Examining data/proj-7.2.0/src/projections/sconics.cpp Examining data/proj-7.2.0/src/projections/robin.cpp Examining data/proj-7.2.0/src/projections/putp6.cpp Examining data/proj-7.2.0/src/projections/eqdc.cpp Examining data/proj-7.2.0/src/projections/wag2.cpp Examining data/proj-7.2.0/src/projections/sts.cpp Examining data/proj-7.2.0/src/projections/putp2.cpp Examining data/proj-7.2.0/src/projections/isea.cpp Examining data/proj-7.2.0/src/projections/cass.cpp Examining data/proj-7.2.0/src/projections/loxim.cpp Examining data/proj-7.2.0/src/projections/putp3.cpp Examining data/proj-7.2.0/src/projections/wag7.cpp Examining data/proj-7.2.0/src/projections/tobmerc.cpp Examining data/proj-7.2.0/src/projections/chamb.cpp Examining data/proj-7.2.0/src/projections/nsper.cpp Examining data/proj-7.2.0/src/projections/vandg4.cpp Examining data/proj-7.2.0/src/projections/airy.cpp Examining data/proj-7.2.0/src/projections/aitoff.cpp Examining data/proj-7.2.0/src/projections/merc.cpp Examining data/proj-7.2.0/src/projections/igh_o.cpp Examining data/proj-7.2.0/src/wkt2_generated_parser.c Examining data/proj-7.2.0/src/dmstor.cpp Examining data/proj-7.2.0/src/wkt1_parser.cpp Examining data/proj-7.2.0/src/proj_experimental.h Examining data/proj-7.2.0/src/networkfilemanager.cpp Examining data/proj-7.2.0/src/transform.cpp Examining data/proj-7.2.0/src/grids.hpp Examining data/proj-7.2.0/src/msfn.cpp Examining data/proj-7.2.0/src/proj_symbol_rename.h Examining data/proj-7.2.0/src/geodesic.c Examining data/proj-7.2.0/src/param.cpp Examining data/proj-7.2.0/src/proj_json_streaming_writer.cpp Examining data/proj-7.2.0/src/mlfn.cpp Examining data/proj-7.2.0/src/filemanager.hpp Examining data/proj-7.2.0/src/list.cpp Examining data/proj-7.2.0/src/internal.cpp Examining data/proj-7.2.0/src/sqlite3_utils.cpp Examining data/proj-7.2.0/src/errno.cpp Examining data/proj-7.2.0/src/ctx.cpp Examining data/proj-7.2.0/src/deriv.cpp Examining data/proj-7.2.0/src/proj_internal.h Examining data/proj-7.2.0/src/init.cpp Examining data/proj-7.2.0/src/wkt1_parser.h Examining data/proj-7.2.0/src/rtodms.cpp Examining data/proj-7.2.0/src/wkt1_generated_parser.h Examining data/proj-7.2.0/src/wkt2_generated_parser.h Examining data/proj-7.2.0/src/generic_inverse.cpp Examining data/proj-7.2.0/src/initcache.cpp Examining data/proj-7.2.0/src/apps/geod_set.cpp Examining data/proj-7.2.0/src/apps/geod.cpp Examining data/proj-7.2.0/src/apps/utils.h Examining data/proj-7.2.0/src/apps/utils.cpp Examining data/proj-7.2.0/src/apps/cs2cs.cpp Examining data/proj-7.2.0/src/apps/proj_strtod.h Examining data/proj-7.2.0/src/apps/projsync.cpp Examining data/proj-7.2.0/src/apps/cct.cpp Examining data/proj-7.2.0/src/apps/emess.h Examining data/proj-7.2.0/src/apps/optargpm.h Examining data/proj-7.2.0/src/apps/geod_interface.h Examining data/proj-7.2.0/src/apps/proj.cpp Examining data/proj-7.2.0/src/apps/geod_interface.cpp Examining data/proj-7.2.0/src/apps/proj_strtod.cpp Examining data/proj-7.2.0/src/apps/emess.cpp Examining data/proj-7.2.0/src/apps/gie.cpp Examining data/proj-7.2.0/src/apps/projinfo.cpp Examining data/proj-7.2.0/src/wkt_parser.hpp Examining data/proj-7.2.0/src/fwd.cpp Examining data/proj-7.2.0/src/qsfn.cpp Examining data/proj-7.2.0/src/auth.cpp Examining data/proj-7.2.0/src/datum_set.cpp FINAL RESULTS: data/proj-7.2.0/src/filemanager.cpp:1358:30: [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. ssize_t nResultLen = readlink("/proc/self/exe", &path[0], BUFFER_SIZE); data/proj-7.2.0/src/networkfilemanager.cpp:1541:22: [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. const auto ret = readlink("/proc/self/exe", &path[0], path.size()); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:986:86: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:5301:23: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(element_type)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:6953:15: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(cr.data(), cr.size(), "%.2hhX", static_cast<unsigned char>(current)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:8386:23: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(cs.data(), cs.size(), "<U+%.4X>", static_cast<unsigned char>(c)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:14013:43: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(string_buffer.data() + bytes, 7, "\\u%04x", data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:14019:43: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(string_buffer.data() + bytes, 13, "\\u%04x\\u%04x", data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:14057:35: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(&sn[0], sn.size(), "%.2X", byte); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:14151:27: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. (std::snprintf)(&sn[0], sn.size(), "%.2X", static_cast<std::uint8_t>(s.back())); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:14352:36: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. std::ptrdiff_t len = (std::snprintf)(number_buffer.data(), number_buffer.size(), "%.*g", d, x); data/proj-7.2.0/src/4D_api.cpp:639:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (def, "break_cs2cs_recursion proj=axisswap axis=%s", P->axis); data/proj-7.2.0/src/4D_api.cpp:654:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (def, "break_cs2cs_recursion proj=vgridshift grids=%s", data/proj-7.2.0/src/4D_api.cpp:670:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (def, "break_cs2cs_recursion proj=hgridshift grids=%s", data/proj-7.2.0/src/4D_api.cpp:703:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (def, "break_cs2cs_recursion proj=helmert exact %s convention=position_vector", s); data/proj-7.2.0/src/4D_api.cpp:777:5: [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 (args, definition); data/proj-7.2.0/src/4D_api.cpp:1509: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 (p, buf); data/proj-7.2.0/src/4D_api.cpp:1517:9: [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 (buf, delim); data/proj-7.2.0/src/4D_api.cpp:1518:5: [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 (buf, app); data/proj-7.2.0/src/apps/cct.cpp:188:5: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf( msg_buf, fmt, args ); data/proj-7.2.0/src/apps/cct.cpp:230:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (usage, o->progname); data/proj-7.2.0/src/apps/cs2cs.cpp:201:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(oform, data.v); data/proj-7.2.0/src/apps/cs2cs.cpp:203:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(oform, data.u); data/proj-7.2.0/src/apps/cs2cs.cpp:205:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(oform, data.u); data/proj-7.2.0/src/apps/cs2cs.cpp:207:17: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(oform, data.v); data/proj-7.2.0/src/apps/cs2cs.cpp:213:13: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(oform, z); data/proj-7.2.0/src/apps/cs2cs.cpp:348:15: [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. (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name); data/proj-7.2.0/src/apps/emess.cpp:60:8: [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. (void)vfprintf(stderr,fmt,args); data/proj-7.2.0/src/apps/geod.cpp:30:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, p * RAD_TO_DEG); TAB; data/proj-7.2.0/src/apps/geod.cpp:31:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, l * RAD_TO_DEG); data/proj-7.2.0/src/apps/geod.cpp:101:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, al12 * RAD_TO_DEG); TAB; data/proj-7.2.0/src/apps/geod.cpp:102:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, al21 * RAD_TO_DEG); TAB; data/proj-7.2.0/src/apps/geod.cpp:103:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(osform, geod_S * fr_meter); data/proj-7.2.0/src/apps/geod.cpp:107:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(osform, geod_S * fr_meter); data/proj-7.2.0/src/apps/geod.cpp:111:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, al12 * RAD_TO_DEG); TAB; data/proj-7.2.0/src/apps/geod.cpp:112:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, al21 * RAD_TO_DEG); TAB; data/proj-7.2.0/src/apps/geod.cpp:113:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(osform, geod_S * fr_meter); data/proj-7.2.0/src/apps/geod.cpp:117:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(osform, geod_S * fr_meter); data/proj-7.2.0/src/apps/geod.cpp:122:11: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, al21 * RAD_TO_DEG); data/proj-7.2.0/src/apps/geod.cpp:142:9: [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. (void)fprintf(stderr, usage, pj_get_release(), data/proj-7.2.0/src/apps/gie.cpp:258:9: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf (usage, o->progname); data/proj-7.2.0/src/apps/gie.cpp:1250:5: [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(stdout, msg, args); data/proj-7.2.0/src/apps/gie.cpp:1499:5: [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 (G->args + args_len + 1, G->next_args + skip_chars); data/proj-7.2.0/src/apps/proj.cpp:156:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, data.uv.v); putchar('\t'); data/proj-7.2.0/src/apps/proj.cpp:157:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, data.uv.u); data/proj-7.2.0/src/apps/proj.cpp:159:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, data.uv.u); putchar('\t'); data/proj-7.2.0/src/apps/proj.cpp:160:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, data.uv.v); data/proj-7.2.0/src/apps/proj.cpp:277:15: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, dat_xy.x); putchar('\n'); data/proj-7.2.0/src/apps/proj.cpp:279:15: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform, dat_xy.y); putchar('\n'); data/proj-7.2.0/src/apps/proj.cpp:304:15: [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. (void)fprintf(stderr, usage, pj_get_release(), emess_dat.Prog_name); data/proj-7.2.0/src/apps/proj.cpp:510:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform ? oform : "%.3f", Proj->a); data/proj-7.2.0/src/apps/proj.cpp:516:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. (void)printf(oform ? oform : "%.3f", Proj->a); data/proj-7.2.0/src/fileapi.cpp:40:42: [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. const char *access); data/proj-7.2.0/src/fileapi.cpp:74:42: [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. const char *access) data/proj-7.2.0/src/fileapi.cpp:79: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. fp = fopen(filename, access); data/proj-7.2.0/src/fileapi.cpp:143:68: [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. PAFile pj_ctx_fopen(projCtx ctx, const char *filename, const char *access) data/proj-7.2.0/src/fileapi.cpp:145:54: [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. return ctx->fileapi_legacy->FOpen(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:605:50: [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. FileAccess access); data/proj-7.2.0/src/filemanager.cpp:685:50: [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. FileAccess access) { data/proj-7.2.0/src/filemanager.cpp:735:50: [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. FileAccess access); data/proj-7.2.0/src/filemanager.cpp:776:50: [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. FileAccess access) { data/proj-7.2.0/src/filemanager.cpp:815:50: [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. FileAccess access); data/proj-7.2.0/src/filemanager.cpp:883:50: [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. FileAccess access); data/proj-7.2.0/src/filemanager.cpp:945:52: [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. FileAccess access) { data/proj-7.2.0/src/filemanager.cpp:960:55: [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. return FileLegacyAdapter::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:964:52: [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. return FileApiAdapter::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:967:43: [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. return FileWin32::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:969:43: [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. return FileStdio::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:1238:25: [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 (home && access(home, W_OK) == 0) { data/proj-7.2.0/src/filemanager.hpp:57:60: [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. open(PJ_CONTEXT *ctx, const char *filename, FileAccess access); data/proj-7.2.0/src/init.cpp:159:5: [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 (buffer, line.data() + strlen (section) + 2); data/proj-7.2.0/src/init.cpp:192: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 (b, buffer); data/proj-7.2.0/src/init.cpp:198:9: [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 (buffer + buffer_length + 1, line.data()); data/proj-7.2.0/src/init.cpp:270: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(szInitStr, xkey); data/proj-7.2.0/src/init.cpp:287:17: [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(definition, proj_string); data/proj-7.2.0/src/init.cpp:430:5: [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( defn_copy, definition ); data/proj-7.2.0/src/init.cpp:713:9: [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( PIN->axis, axis_arg ); data/proj-7.2.0/src/initcache.cpp:55:7: [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( newitem->param, list->param ); data/proj-7.2.0/src/initcache.cpp:177:5: [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( cache_key[cache_count], filekey ); data/proj-7.2.0/src/log.cpp:75:5: [4] (format) vsprintf: Potential format string problem (CWE-134). Make format string constant. vsprintf( msg_buf, fmt, args ); data/proj-7.2.0/src/param.cpp:46:15: [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). (void)strcpy(newitem->param, str); data/proj-7.2.0/src/pr_list.cpp:89:17: [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( def2, definition ); data/proj-7.2.0/src/pr_list.cpp:101:9: [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( definition, t->param ); data/proj-7.2.0/src/proj.h:401:91: [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. PROJ_FILE_HANDLE* (*open_cbk)(PJ_CONTEXT *ctx, const char *filename, PROJ_OPEN_ACCESS access, void* user_data); data/proj-7.2.0/src/proj_api.h:128:69: [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. PAFile (*FOpen)(projCtx ctx, const char *filename, const char *access); data/proj-7.2.0/src/proj_api.h:211:77: [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. PAFile PROJ_DLL pj_ctx_fopen(projCtx ctx, const char *filename, const char *access); data/proj-7.2.0/src/proj_internal.h:703:91: [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. PROJ_FILE_HANDLE* (*open_cbk)(PJ_CONTEXT *ctx, const char *filename, PROJ_OPEN_ACCESS access, void* user_data) = nullptr; data/proj-7.2.0/src/rtodms.cpp:63:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(ss,format,deg,min,sec,sign); data/proj-7.2.0/src/rtodms.cpp:69:9: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. (void)sprintf(ss,format,deg,min,sec,sign); data/proj-7.2.0/src/strtod.cpp:98:17: [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(pszWorkBuffer, pszNumber); data/proj-7.2.0/src/strtod.cpp:127:21: [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(pszWorkBuffer, pszNumber); data/proj-7.2.0/src/transformations/horner.cpp:421:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "t%s", param); data/proj-7.2.0/src/transformations/horner.cpp:426:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (buf, "s%s", param); data/proj-7.2.0/src/utils.cpp:83:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +datum=%s", data/proj-7.2.0/src/utils.cpp:88:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +ellps=%s", data/proj-7.2.0/src/utils.cpp:93:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +a=%s", data/proj-7.2.0/src/utils.cpp:97:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +b=%s", data/proj-7.2.0/src/utils.cpp:100:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +es=%s", data/proj-7.2.0/src/utils.cpp:103:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +f=%s", data/proj-7.2.0/src/utils.cpp:128:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +towgs84=%s", data/proj-7.2.0/src/utils.cpp:132:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +nadgrids=%s", data/proj-7.2.0/src/utils.cpp:138:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +R=%s", data/proj-7.2.0/src/utils.cpp:151:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +R_lat_a=%s", data/proj-7.2.0/src/utils.cpp:155:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +R_lat_g=%s", data/proj-7.2.0/src/utils.cpp:160:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf( defn+strlen(defn), " +pm=%s", data/proj-7.2.0/src/wkt1_generated_parser.c:813:21: [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. # define YYFPRINTF fprintf data/proj-7.2.0/src/wkt2_generated_parser.c:2301:21: [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. # define YYFPRINTF fprintf data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-death-test-internal.h:169:5: [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. fprintf(\ data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2503:20: [4] (buffer) StrNCpy: 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). inline const char* StrNCpy(char* dest, const char* src, size_t n) { data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2574:26: [4] (format) _snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define GTEST_SNPRINTF_ _snprintf data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2576:26: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define GTEST_SNPRINTF_ snprintf data/proj-7.2.0/test/googletest/src/gtest.cc:138:10: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. # define vsnprintf _vsnprintf data/proj-7.2.0/test/googletest/src/gtest.cc:3039:5: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/proj-7.2.0/test/googletest/src/gtest.cc:3060:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/proj-7.2.0/test/googletest/src/gtest.cc:3067:3: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, args); data/proj-7.2.0/test/unit/pj_transform_test.cpp:665:70: [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. static PAFile myFOpen(projCtx ctx, const char *filename, const char *access) { data/proj-7.2.0/test/unit/pj_transform_test.cpp:666:32: [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. FILE *fp = fopen(filename, access); data/proj-7.2.0/test/unit/test_network.cpp:1798:40: [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. PROJ_OPEN_ACCESS access, data/proj-7.2.0/src/4D_api.cpp:920:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* val = getenv("PROJ_USE_PROJ4_INIT_RULES"); data/proj-7.2.0/src/apps/cs2cs.cpp:334:9: [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("PROJ_USE_ENV_LOCALE") != nullptr) data/proj-7.2.0/src/apps/cs2cs.cpp:338:9: [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("PROJ_USE_PROJ4_INIT_RULES") == nullptr) { data/proj-7.2.0/src/apps/projinfo.cpp:554:9: [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("PROJINFO_NO_GRID_CHECK") == nullptr) { data/proj-7.2.0/src/apps/projinfo.cpp:633: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. if (dbContext && getenv("PROJINFO_NO_GRID_CHECK") == nullptr) { data/proj-7.2.0/src/ctx.cpp:106:9: [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("PROJ_DEBUG") != nullptr ) data/proj-7.2.0/src/ctx.cpp:108: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. if( atoi(getenv("PROJ_DEBUG")) >= -PJ_LOG_DEBUG_MINOR ) data/proj-7.2.0/src/ctx.cpp:109: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. ctx.debug_level = atoi(getenv("PROJ_DEBUG")); data/proj-7.2.0/src/filemanager.cpp:1069:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *envvar = getenv("PROJ_LIB"); data/proj-7.2.0/src/filemanager.cpp:1197:13: [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("PROJ_USER_WRITABLE_DIRECTORY"); data/proj-7.2.0/src/filemanager.cpp:1223:42: [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 *local_app_data = getenv("LOCALAPPDATA"); data/proj-7.2.0/src/filemanager.cpp:1225:34: [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. local_app_data = getenv("TEMP"); data/proj-7.2.0/src/filemanager.cpp:1233:37: [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 *xdg_data_home = getenv("XDG_DATA_HOME"); data/proj-7.2.0/src/filemanager.cpp:1237: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 *home = getenv("HOME"); data/proj-7.2.0/src/filemanager.cpp:1443:26: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *envVar = getenv("PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY"); data/proj-7.2.0/src/filemanager.cpp:1466: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. if ((sysname = getenv("HOME")) != nullptr) { data/proj-7.2.0/src/filemanager.cpp:1593:9: [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("PROJ_SKIP_READ_USER_WRITABLE_DIRECTORY"); data/proj-7.2.0/src/filemanager.cpp:1819:37: [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 *endpoint_from_env = getenv("PROJ_NETWORK_ENDPOINT"); data/proj-7.2.0/src/filemanager.cpp:1856:39: [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 *enabled = getenv("PROJ_NETWORK"); data/proj-7.2.0/src/grids.cpp:3039:13: [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("PROJ_DEBUG")) data/proj-7.2.0/src/grids.cpp:3047: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. if (del.lam == HUGE_VAL && getenv("PROJ_DEBUG")) data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:11811: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 bool debugSort = getenv("PROJ_DEBUG_SORT_FUNCT") != nullptr; data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:11816:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. !(getenv("PROJ_DEBUG_SORT_FUNCT_ASSERT") != nullptr); data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:13667:10: [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("PROJ_FORCE_SEARCH_PIVOT"))) { data/proj-7.2.0/src/networkfilemanager.cpp:303:33: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *max_iters = getenv("PROJ_LOCK_MAX_ITERS"); data/proj-7.2.0/src/networkfilemanager.cpp:332:9: [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("PROJ_CHECK_CACHE_CONSISTENCY")) { data/proj-7.2.0/src/networkfilemanager.cpp:1603:9: [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("PROJ_CURL_VERBOSE")) data/proj-7.2.0/src/networkfilemanager.cpp:1615:9: [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("PROJ_UNSAFE_SSL")) { data/proj-7.2.0/src/networkfilemanager.cpp:1622: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. ca_bundle_path = getenv("PROJ_CURL_CA_BUNDLE"); data/proj-7.2.0/src/networkfilemanager.cpp:1626: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. ca_bundle_path = getenv("CURL_CA_BUNDLE"); data/proj-7.2.0/src/networkfilemanager.cpp:1631: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. ca_bundle_path = getenv("SSL_CERT_FILE"); data/proj-7.2.0/src/networkfilemanager.cpp:1639:9: [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("PROJ_NO_USERAGENT") == nullptr) { data/proj-7.2.0/src/networkfilemanager.cpp:2061:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *enabled = getenv("PROJ_NETWORK"); data/proj-7.2.0/src/networkfilemanager.cpp:2153:31: [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 *env_var = getenv("PROJ_GRID_CACHE_MAX_SIZE_BYTES"); data/proj-7.2.0/src/networkfilemanager.cpp:2398:9: [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("PROJ_FULL_FILE_CHUNK_SIZE"); data/proj-7.2.0/src/sqlite3_utils.cpp:147:17: [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("PROJ_LOG_SQLITE3") != nullptr) { data/proj-7.2.0/src/tracing.cpp:93:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *traceFile = getenv("PROJ_TRACE_FILE"); data/proj-7.2.0/src/tracing.cpp:99: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 *minDelay = getenv("PROJ_TRACE_MIN_DELAY"); data/proj-7.2.0/src/tracing.cpp:104:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *whiteList = getenv("PROJ_TRACE_WHITE_LIST"); data/proj-7.2.0/src/tracing.cpp:109:29: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *blackList = getenv("PROJ_TRACE_BLACK_LIST"); data/proj-7.2.0/test/googletest/include/gtest/gtest.h:966:39: [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. void ShuffleTests(internal::Random* random); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2542:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* const env = getenv(name); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2545:10: [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. return getenv(name); data/proj-7.2.0/test/googletest/src/gtest-internal-inl.h:308:37: [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. void ShuffleRange(internal::Random* random, int begin, int end, data/proj-7.2.0/test/googletest/src/gtest-internal-inl.h:329:39: [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. inline void Shuffle(internal::Random* random, std::vector<E>* v) { data/proj-7.2.0/test/googletest/src/gtest-internal-inl.h:330:16: [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. ShuffleRange(random, 0, static_cast<int>(v->size()), v); data/proj-7.2.0/test/googletest/src/gtest-internal-inl.h:796:21: [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. internal::Random* random() { return &random_; } data/proj-7.2.0/test/googletest/src/gtest-port.cc:258:5: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. ::InitializeCriticalSection(critical_section_); data/proj-7.2.0/test/googletest/src/gtest-port.cc:276:5: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. ::EnterCriticalSection(critical_section_); data/proj-7.2.0/test/googletest/src/gtest-port.cc:349:11: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. ::InitializeCriticalSection(critical_section_); data/proj-7.2.0/test/googletest/src/gtest.cc:2830:47: [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. void TestCase::ShuffleTests(internal::Random* random) { data/proj-7.2.0/test/googletest/src/gtest.cc:2831:11: [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. Shuffle(random, &test_indices_); data/proj-7.2.0/test/googletest/src/gtest.cc:5155:7: [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. random()->Reseed(random_seed_); data/proj-7.2.0/test/googletest/src/gtest.cc:5505:16: [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. ShuffleRange(random(), 0, last_death_test_case_ + 1, &test_case_indices_); data/proj-7.2.0/test/googletest/src/gtest.cc:5508:16: [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. ShuffleRange(random(), last_death_test_case_ + 1, data/proj-7.2.0/test/googletest/src/gtest.cc:5513:34: [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. test_cases_[i]->ShuffleTests(random()); data/proj-7.2.0/test/unit/gie_self_tests.cpp:360:9: [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("HOME") || getenv("PROJ_LIB")) { data/proj-7.2.0/test/unit/gie_self_tests.cpp:360:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("HOME") || getenv("PROJ_LIB")) { data/proj-7.2.0/test/unit/proj_context_test.cpp:57: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 *temp_dir = getenv("TEMP"); data/proj-7.2.0/test/unit/proj_context_test.cpp:59:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. temp_dir = getenv("TMP"); data/proj-7.2.0/test/unit/test_c_api.cpp:4006:31: [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 *tempdir = getenv("TEMP"); data/proj-7.2.0/test/unit/test_c_api.cpp:4008:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tempdir = getenv("TMP"); data/proj-7.2.0/test/unit/test_c_api.cpp:4101:27: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *tempdir = getenv("TEMP"); data/proj-7.2.0/test/unit/test_c_api.cpp:4103:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. tempdir = getenv("TMP"); data/proj-7.2.0/test/unit/test_factory.cpp:2810: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. const char *temp = getenv("TEMP"); data/proj-7.2.0/test/unit/test_factory.cpp:2812: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. temp = getenv("TMP"); data/proj-7.2.0/test/unit/test_network.cpp:449:40: [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 *proj_source_data = getenv("PROJ_SOURCE_DATA"); data/proj-7.2.0/test/unit/test_network.cpp:655:40: [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 *proj_source_data = getenv("PROJ_SOURCE_DATA"); data/proj-7.2.0/test/unit/test_network.cpp:771:40: [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 *proj_source_data = getenv("PROJ_SOURCE_DATA"); data/proj-7.2.0/test/unit/test_network.cpp:928:40: [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 *proj_source_data = getenv("PROJ_SOURCE_DATA"); data/proj-7.2.0/test/unit/test_network.cpp:1032:40: [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 *proj_source_data = getenv("PROJ_SOURCE_DATA"); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:1380:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((struct { char v[sizeof(void) * 2]; } *) 1) \ data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:6895:14: [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(&result, vec.data(), sizeof(NumberType)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:12455:14: [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(vec.data(), &n, sizeof(NumberType)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:12486:14: [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(&result, &x, sizeof(x)); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:12584:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&target, &source, sizeof(Source)); data/proj-7.2.0/src/4D_api.cpp:717: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 def[150]; data/proj-7.2.0/src/4D_api.cpp:718:9: [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 (def, "break_cs2cs_recursion proj=cart a=%40.20g es=%40.20g", P->a_orig, P->es_orig); data/proj-7.2.0/src/4D_api.cpp:736:13: [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 (def, "break_cs2cs_recursion proj=cart ellps=WGS84"); data/proj-7.2.0/src/4D_api.cpp:1523:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char version[64] = {""}; data/proj-7.2.0/src/4D_api.cpp:1545: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 (version, "%d.%d.%d", info.major, info.minor, info.patch); data/proj-7.2.0/src/4D_api.cpp:1689:61: [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 auto gridSet = NS_PROJ::VerticalShiftGridSet::open(ctx, gridname); data/proj-7.2.0/src/4D_api.cpp:1703:63: [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 auto gridSet = NS_PROJ::HorizontalShiftGridSet::open(ctx, gridname); data/proj-7.2.0/src/4D_api.cpp:1715:5: [2] (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). Risk is low because the source is a constant string. strcpy(grinfo.format, "missing"); data/proj-7.2.0/src/4D_api.cpp:1737: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 param[80], key[74]; data/proj-7.2.0/src/4D_api.cpp:1752:13: [2] (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). Risk is low because the source is a constant string. strcpy(ininfo.origin, "EPSG"); data/proj-7.2.0/src/4D_api.cpp:1770:13: [2] (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). Risk is low because the source is a constant string. strcpy(ininfo.origin, "IGNF"); data/proj-7.2.0/src/4D_api.cpp:1787:5: [2] (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). Risk is low because the source is a constant string. strcpy(ininfo.origin, "Unknown"); data/proj-7.2.0/src/4D_api.cpp:1788:5: [2] (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). Risk is low because the source is a constant string. strcpy(ininfo.version, "Unknown"); data/proj-7.2.0/src/4D_api.cpp:1789:5: [2] (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). Risk is low because the source is a constant string. strcpy(ininfo.lastupdate, "Unknown"); data/proj-7.2.0/src/4D_api.cpp:1793: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(key + strlen(key), ":metadata", 9 + 1); data/proj-7.2.0/src/4D_api.cpp:1794:5: [2] (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). Risk is low because the source is a constant string. strcpy(param, "+init="); data/proj-7.2.0/src/apps/cct.cpp:248:16: [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). fout = fopen (opt_arg (o, "output"), "wt"); data/proj-7.2.0/src/apps/cct.cpp:268:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int dec = atoi (opt_arg (o, "d")); data/proj-7.2.0/src/apps/cct.cpp:274: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). skip_lines = atoi (opt_arg(o, "s")); data/proj-7.2.0/src/apps/cs2cs.cpp:70:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char oform_buffer[16]; /* buffer for oform when using -d */ data/proj-7.2.0/src/apps/cs2cs.cpp:87: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[MAX_LINE + 3], *s, pline[40]; data/proj-7.2.0/src/apps/cs2cs.cpp:472:60: [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). pj_ctx_set_debug(pj_get_default_ctx(), atoi(*++argv)); data/proj-7.2.0/src/apps/cs2cs.cpp:477:21: [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(oform_buffer, "%%.%df", atoi(*++argv)); data/proj-7.2.0/src/apps/cs2cs.cpp:477:53: [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). sprintf(oform_buffer, "%%.%df", atoi(*++argv)); data/proj-7.2.0/src/apps/cs2cs.cpp:645:24: [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). if ((fid = fopen(*eargv, "rt")) == nullptr) { data/proj-7.2.0/src/apps/geod.cpp:23:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char pline[50]; /* work string */ data/proj-7.2.0/src/apps/geod.cpp:64:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[MAXLINE+3], *s; data/proj-7.2.0/src/apps/geod.cpp:130:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *pargv[MAX_PARGS]; data/proj-7.2.0/src/apps/geod.cpp:235:16: [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). if ((fid = fopen(*eargv, "r")) == nullptr) { data/proj-7.2.0/src/apps/gie.cpp: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 operation[MAX_OPERATION+1]; data/proj-7.2.0/src/apps/gie.cpp:178: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 crs_dst[MAX_OPERATION+1]; data/proj-7.2.0/src/apps/gie.cpp:179: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 crs_src[MAX_OPERATION+1]; data/proj-7.2.0/src/apps/gie.cpp:278:18: [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). T.fout = fopen (opt_arg (o, "output"), "rt"); data/proj-7.2.0/src/apps/gie.cpp:307:19: [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* f = fopen (o->fargv[i], "rt"); data/proj-7.2.0/src/apps/gie.cpp:402:12: [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). F->f = fopen (fname, "rt"); data/proj-7.2.0/src/apps/gie.cpp:623: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 buffer[80]; data/proj-7.2.0/src/apps/gie.cpp:1211: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 tolower_err_const[100] = {}; data/proj-7.2.0/src/apps/optargpm.h:220: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 flaglevel[21]; /* if flag -f is specified n times, its optarg pointer is set to flaglevel + n */ data/proj-7.2.0/src/apps/optargpm.h: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 *optarg[256]; /* optarg[(int) 'f'] holds a pointer to the argument of option "-f" */ data/proj-7.2.0/src/apps/optargpm.h:284:18: [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). opt->input = fopen (opt->fargv[opt->input_index++], binary? "rb": "rt"); data/proj-7.2.0/src/apps/optargpm.h:470:5: [2] (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). Risk is low because the source is a constant string. strcpy (o->flaglevel, "<stdin>"); data/proj-7.2.0/src/apps/optargpm.h:507:13: [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 cstring[2], *crepr = cstring; data/proj-7.2.0/src/apps/proj.cpp:45:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char oform_buffer[16]; /* Buffer for oform when using -d */ data/proj-7.2.0/src/apps/proj.cpp:58: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[MAX_LINE+3], *s = nullptr, pline[40]; data/proj-7.2.0/src/apps/proj.cpp:179: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[MAX_LINE+3], *s, pline[40]; data/proj-7.2.0/src/apps/proj.cpp:294: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 *pargv[MAX_PARGS] = {}; data/proj-7.2.0/src/apps/proj.cpp:437:17: [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(oform_buffer, "%%.%df", atoi(*++argv)); data/proj-7.2.0/src/apps/proj.cpp:437:49: [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). sprintf(oform_buffer, "%%.%df", atoi(*++argv)); data/proj-7.2.0/src/apps/proj.cpp:546:24: [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). if ((fid = fopen(*eargv, "rb")) == nullptr) { data/proj-7.2.0/src/apps/proj_strtod.cpp:328:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char u[1024]; data/proj-7.2.0/src/apps/projinfo.cpp:156: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). fs.open(filename, std::fstream::in | std::fstream::binary); data/proj-7.2.0/src/apps/projinfo.cpp:163:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[256]; data/proj-7.2.0/src/apps/projsync.cpp:258: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). auto file = NS_PROJ::FileManager::open(ctx, files_geojson_local.c_str(), data/proj-7.2.0/src/conversions/axisswap.cpp:207:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). Q->axis[n] = abs(atoi(s))-1; data/proj-7.2.0/src/conversions/axisswap.cpp:212:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). Q->sign[n++] = sign(atoi(s)); data/proj-7.2.0/src/ctx.cpp:108: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). if( atoi(getenv("PROJ_DEBUG")) >= -PJ_LOG_DEBUG_MINOR ) data/proj-7.2.0/src/ctx.cpp:109:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ctx.debug_level = atoi(getenv("PROJ_DEBUG")); data/proj-7.2.0/src/datum_set.cpp:80:13: [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 entry[100]; data/proj-7.2.0/src/datum_set.cpp:82:13: [2] (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). Risk is low because the source is a constant string. strcpy( entry, "ellps=" ); data/proj-7.2.0/src/dmstor.cpp:31: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 *s, work[MAX_WORK]; data/proj-7.2.0/src/fileapi.cpp:79: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). fp = fopen(filename, access); data/proj-7.2.0/src/filemanager.cpp:552:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). int wlen = MultiByteToWideChar(src_code_page, MB_ERR_INVALID_CHARS, src, -1, data/proj-7.2.0/src/filemanager.cpp:561:5: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(src_code_page, 0, src, -1, &wbuf[0], wlen); data/proj-7.2.0/src/filemanager.cpp:604: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). static std::unique_ptr<File> open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:684: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). std::unique_ptr<File> FileWin32::open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:734: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). static std::unique_ptr<File> open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:775: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). std::unique_ptr<File> FileStdio::open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:777: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). auto fp = fopen(filename, data/proj-7.2.0/src/filemanager.cpp:814: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). static std::unique_ptr<File> open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:848: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). FileLegacyAdapter::open(PJ_CONTEXT *ctx, const char *filename, FileAccess) { data/proj-7.2.0/src/filemanager.cpp:882: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). static std::unique_ptr<File> open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:921: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). std::unique_ptr<File> FileApiAdapter::open(PJ_CONTEXT *ctx, data/proj-7.2.0/src/filemanager.cpp:944: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). std::unique_ptr<File> FileManager::open(PJ_CONTEXT *ctx, const char *filename, data/proj-7.2.0/src/filemanager.cpp:960:35: [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 FileLegacyAdapter::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:964:32: [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 FileApiAdapter::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:967: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). return FileWin32::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:969: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). return FileStdio::open(ctx, filename, access); data/proj-7.2.0/src/filemanager.cpp:1622: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). return NS_PROJ::FileManager::open(ctx, name, NS_PROJ::FileAccess::READ_ONLY) data/proj-7.2.0/src/filemanager.cpp:1720: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). open(ctx, remote_file.c_str(), NS_PROJ::FileAccess::READ_ONLY); data/proj-7.2.0/src/filemanager.cpp:1867:33: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). const int val = atoi(value.c_str()); data/proj-7.2.0/src/filemanager.cpp:1871:43: [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). ctx->gridChunkCache.ttl = atoi(value.c_str()); data/proj-7.2.0/src/filemanager.hpp:57: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(PJ_CONTEXT *ctx, const char *filename, FileAccess access); data/proj-7.2.0/src/grids.cpp:174: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). static GTXVerticalShiftGrid *open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:191:45: [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). GTXVerticalShiftGrid *GTXVerticalShiftGrid::open(PJ_CONTEXT *ctx, data/proj-7.2.0/src/grids.cpp:194: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 header[40]; data/proj-7.2.0/src/grids.cpp:215: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(&yorigin, header + 0, 8); data/proj-7.2.0/src/grids.cpp:216: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(&xorigin, header + 8, 8); data/proj-7.2.0/src/grids.cpp:217: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(&ystep, header + 16, 8); data/proj-7.2.0/src/grids.cpp:218: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(&xstep, header + 24, 8); data/proj-7.2.0/src/grids.cpp:220: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(&rows, header + 32, 4); data/proj-7.2.0/src/grids.cpp:221: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(&columns, header + 36, 4); data/proj-7.2.0/src/grids.cpp:500:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). sample = atoi(tag.c_str() + samplePos + strlen("sample=\"")); data/proj-7.2.0/src/grids.cpp:1089: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(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1108: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). auto newGS = open(ctx, std::move(fp), m_name); data/proj-7.2.0/src/grids.cpp:1258: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). GTiffVGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1348: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). VerticalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { data/proj-7.2.0/src/grids.cpp:1365: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). auto grid = GTXVerticalShiftGrid::open(ctx, std::move(fp), actualName); data/proj-7.2.0/src/grids.cpp:1380: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 header[4]; data/proj-7.2.0/src/grids.cpp:1390: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). GTiffVGridShiftSet::open(ctx, std::move(fp), actualName)); data/proj-7.2.0/src/grids.cpp:1410: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). auto newGS = open(ctx, m_name); data/proj-7.2.0/src/grids.cpp:1548: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). static NTv1Grid *open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1565: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). NTv1Grid *NTv1Grid::open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1567: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 header[192]; data/proj-7.2.0/src/grids.cpp:1670: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). static CTable2Grid *open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1687:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). CTable2Grid *CTable2Grid::open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:1689: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 header[160]; data/proj-7.2.0/src/grids.cpp:1713: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(&extent.west, header + 96, 8); data/proj-7.2.0/src/grids.cpp:1714: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(&extent.south, header + 104, 8); data/proj-7.2.0/src/grids.cpp:1715: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(&extent.resX, header + 112, 8); data/proj-7.2.0/src/grids.cpp:1716: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(&extent.resY, header + 120, 8); data/proj-7.2.0/src/grids.cpp:1726: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(&width, header + 128, 4); data/proj-7.2.0/src/grids.cpp:1727: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(&height, header + 132, 4); data/proj-7.2.0/src/grids.cpp:1774:41: [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 std::unique_ptr<NTv2GridSet> open(PJ_CONTEXT *ctx, data/proj-7.2.0/src/grids.cpp:1851: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). std::unique_ptr<NTv2GridSet> NTv2GridSet::open(PJ_CONTEXT *ctx, data/proj-7.2.0/src/grids.cpp:1859: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 header[11 * 16]; data/proj-7.2.0/src/grids.cpp:1892: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(&num_subfiles, header + OFFSET_NUM_SUBFILES, 4); data/proj-7.2.0/src/grids.cpp:1964: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(&gs_count, header + OFFSET_GS_COUNT, 4); data/proj-7.2.0/src/grids.cpp:2010: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(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:2029: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). auto newGS = open(ctx, std::move(fp), m_name); data/proj-7.2.0/src/grids.cpp:2134: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). GTiffHGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:2302: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). HorizontalShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { data/proj-7.2.0/src/grids.cpp:2319: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 header[160]; data/proj-7.2.0/src/grids.cpp:2339:31: [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). auto grid = NTv1Grid::open(ctx, std::move(fp), actualName); data/proj-7.2.0/src/grids.cpp:2350: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). auto grid = CTable2Grid::open(ctx, std::move(fp), actualName); data/proj-7.2.0/src/grids.cpp:2363:29: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return NTv2GridSet::open(ctx, std::move(fp), actualName); data/proj-7.2.0/src/grids.cpp:2368: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). GTiffHGridShiftSet::open(ctx, std::move(fp), actualName)); data/proj-7.2.0/src/grids.cpp:2388: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). auto newGS = open(ctx, m_name); data/proj-7.2.0/src/grids.cpp:2452: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(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:2471: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). auto newGS = open(ctx, std::move(fp), m_name); data/proj-7.2.0/src/grids.cpp:2608:27: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). GTiffGenericGridShiftSet::open(PJ_CONTEXT *ctx, std::unique_ptr<File> fp, data/proj-7.2.0/src/grids.cpp:2674: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). GenericShiftGridSet::open(PJ_CONTEXT *ctx, const std::string &filename) { data/proj-7.2.0/src/grids.cpp:2694: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 header[4]; data/proj-7.2.0/src/grids.cpp:2704: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). GTiffGenericGridShiftSet::open(ctx, std::move(fp), actualName)); data/proj-7.2.0/src/grids.cpp:2724: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). auto newGS = open(ctx, m_name); data/proj-7.2.0/src/grids.cpp:2785:45: [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). auto gridSet = GenericShiftGridSet::open(P->ctx, gridname); data/proj-7.2.0/src/grids.cpp:2829:48: [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). auto gridSet = HorizontalShiftGridSet::open(ctx, gridname); data/proj-7.2.0/src/grids.cpp:3308:46: [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). auto gridSet = VerticalShiftGridSet::open(P->ctx, gridname); data/proj-7.2.0/src/grids.hpp:114: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(PJ_CONTEXT *ctx, const std::string &filename); data/proj-7.2.0/src/grids.hpp:166: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(PJ_CONTEXT *ctx, const std::string &filename); data/proj-7.2.0/src/grids.hpp:225: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(PJ_CONTEXT *ctx, const std::string &filename); data/proj-7.2.0/src/init.cpp:238: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 unused[256]; data/proj-7.2.0/src/init.cpp:239: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 initname[5]; data/proj-7.2.0/src/init.cpp:256:13: [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 szInitStr[7 + 64]; data/proj-7.2.0/src/init.cpp:269:13: [2] (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). Risk is low because the source is a constant string. strcpy(szInitStr, "+init="); data/proj-7.2.0/src/init.cpp:421: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 *argv[MAX_ARG]; data/proj-7.2.0/src/init.cpp:635:5: [2] (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). Risk is low because the source is a constant string. strcpy( PIN->axis, "enu" ); data/proj-7.2.0/src/initcache.cpp:157:13: [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( cache_key_new, cache_key, sizeof(char*) * cache_count); data/proj-7.2.0/src/initcache.cpp:166:13: [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( cache_paralist_new, cache_paralist, data/proj-7.2.0/src/iso19111/c_api.cpp:485:20: [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. auto ret = new char *[set.size() + 1]; data/proj-7.2.0/src/iso19111/c_api.cpp:497:14: [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(ret[i], str.c_str(), str.size() + 1); data/proj-7.2.0/src/iso19111/c_api.cpp:1461:53: [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). formatter->setIndentationWidth(std::atoi(value)); data/proj-7.2.0/src/iso19111/c_api.cpp:1557:53: [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). formatter->setIndentationWidth(std::atoi(value)); data/proj-7.2.0/src/iso19111/c_api.cpp:1559:50: [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). formatter->setMaxLineLength(std::atoi(value)); data/proj-7.2.0/src/iso19111/c_api.cpp:1630:53: [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). formatter->setIndentationWidth(std::atoi(value)); data/proj-7.2.0/src/iso19111/common.cpp:687: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). return ::atoi(id->code().c_str()); data/proj-7.2.0/src/iso19111/crs.cpp:2666: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 *order[2] = {nullptr, nullptr}; data/proj-7.2.0/src/iso19111/crs.cpp:2683: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 orderStr[10]; data/proj-7.2.0/src/iso19111/crs.cpp:2684:9: [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(orderStr, "%.2s,%.2s", order[0], order[1]); data/proj-7.2.0/src/iso19111/crs.cpp:3962:19: [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 *order[2] = {nullptr, nullptr}; data/proj-7.2.0/src/iso19111/crs.cpp:3977: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. char orderStr[10]; data/proj-7.2.0/src/iso19111/crs.cpp:3978:17: [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(orderStr, "%.2s,%.2s", order[0], order[1]); data/proj-7.2.0/src/iso19111/factory.cpp:134: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(const std::string &databasePath, PJ_CONTEXT *ctx); data/proj-7.2.0/src/iso19111/factory.cpp:498:32: [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 DatabaseContext::Private::open(const std::string &databasePath, data/proj-7.2.0/src/iso19111/factory.cpp:864: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). dbCtx->getPrivate()->open(databasePath, ctx); data/proj-7.2.0/src/iso19111/factory.cpp:3475:44: [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 method_code_int = std::atoi(method_code.c_str()); data/proj-7.2.0/src/iso19111/internal.cpp:351: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 szBuffer[BUF_SIZE]; data/proj-7.2.0/src/iso19111/internal.cpp:360: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 szBuffer[BUF_SIZE]; data/proj-7.2.0/src/iso19111/io.cpp:3000:47: [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). paramEPSGCode = ::atoi(paramIds[0]->code().c_str()); data/proj-7.2.0/src/iso19111/io.cpp:9331:31: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). const int zone = std::atoi(getParamValue(step, "zone").c_str()); data/proj-7.2.0/src/iso19111/io.cpp:9669:13: [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 unused[256]; data/proj-7.2.0/src/malloc.cpp:150: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(dup, str, len); data/proj-7.2.0/src/networkfilemanager.cpp:215:44: [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 std::unique_ptr<DiskChunkCache> open(PJ_CONTEXT *ctx); data/proj-7.2.0/src/networkfilemanager.cpp:248:49: [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). std::unique_ptr<DiskChunkCache> DiskChunkCache::open(PJ_CONTEXT *ctx) { data/proj-7.2.0/src/networkfilemanager.cpp:304:47: [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 (i >= (max_iters && max_iters[0] ? atoi(max_iters) data/proj-7.2.0/src/networkfilemanager.cpp:796: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). auto diskCache = DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:1012: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). auto diskCache = DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:1077: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). auto diskCache = DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:1090: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). auto diskCache = DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:1190: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). auto diskCache = DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:1261: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). static std::unique_ptr<File> open(PJ_CONTEXT *ctx, const char *filename); data/proj-7.2.0/src/networkfilemanager.cpp:1298: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). std::unique_ptr<File> NetworkFile::open(PJ_CONTEXT *ctx, const char *filename) { data/proj-7.2.0/src/networkfilemanager.cpp:1310: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). auto handle = ctx->networking.open( data/proj-7.2.0/src/networkfilemanager.cpp:1340: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 NetworkFile::open(ctx, filename); data/proj-7.2.0/src/networkfilemanager.cpp:1401:46: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). m_handle = m_ctx->networking.open( data/proj-7.2.0/src/networkfilemanager.cpp:1457: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(buffer, region.data() + iterOffset - offsetToDownload, nToCopy); data/proj-7.2.0/src/networkfilemanager.cpp:1520: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 m_szCurlErrBuf[CURL_ERROR_SIZE + 1] = {}; data/proj-7.2.0/src/networkfilemanager.cpp:1530: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(PJ_CONTEXT *, const char *url, unsigned long long offset, data/proj-7.2.0/src/networkfilemanager.cpp:1694: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). PROJ_NETWORK_HANDLE *CurlFileHandle::open(PJ_CONTEXT *ctx, const char *url, data/proj-7.2.0/src/networkfilemanager.cpp:1712: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 szBuffer[128]; data/proj-7.2.0/src/networkfilemanager.cpp:1777: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(buffer, body.data(), std::min(size_to_read, body.size())); data/proj-7.2.0/src/networkfilemanager.cpp:1806: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 szBuffer[128]; data/proj-7.2.0/src/networkfilemanager.cpp:1867: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(buffer, body.data(), std::min(size_to_read, body.size())); data/proj-7.2.0/src/networkfilemanager.cpp:1927:44: [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). ctx->networking.open = CurlFileHandle::open; data/proj-7.2.0/src/networkfilemanager.cpp:2042: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). ctx->networking.open != NS_PROJ::no_op_network_open; data/proj-7.2.0/src/networkfilemanager.cpp:2155:44: [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). ctx->gridChunkCache.max_size = atoi(env_var); data/proj-7.2.0/src/networkfilemanager.cpp:2239: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). auto f = NS_PROJ::FileManager::open(ctx, localFilename.c_str(), data/proj-7.2.0/src/networkfilemanager.cpp:2246:47: [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). auto diskCache = NS_PROJ::DiskChunkCache::open(ctx); data/proj-7.2.0/src/networkfilemanager.cpp:2278:47: [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). auto handle = ctx->networking.open( data/proj-7.2.0/src/networkfilemanager.cpp:2384: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 szUniqueSuffix[128]; data/proj-7.2.0/src/networkfilemanager.cpp:2387: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). auto f = NS_PROJ::FileManager::open(ctx, localFilenameTmp.c_str(), data/proj-7.2.0/src/networkfilemanager.cpp:2401: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). buffer.resize(atoi(env_var_PROJ_FULL_FILE_CHUNK_SIZE)); data/proj-7.2.0/src/networkfilemanager.cpp:2406:35: [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). auto handle = ctx->networking.open( data/proj-7.2.0/src/networkfilemanager.cpp:2489:47: [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). auto diskCache = NS_PROJ::DiskChunkCache::open(ctx); data/proj-7.2.0/src/param.cpp:88: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(newitem->param, str, len); data/proj-7.2.0/src/param.cpp:203: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). value.i = atoi(opt); data/proj-7.2.0/src/pr_list.cpp:100:9: [2] (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). Risk is low because the source is a constant string. strcat( definition, " +" ); data/proj-7.2.0/src/proj.h: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 gridname[32]; /* name of grid */ data/proj-7.2.0/src/proj.h:314: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 filename[260]; /* full path to grid */ data/proj-7.2.0/src/proj.h:315: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 format[8]; /* file format of grid */ data/proj-7.2.0/src/proj.h:323: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 name[32]; /* name of init file */ data/proj-7.2.0/src/proj.h:324: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 filename[260]; /* full path to the init file. */ data/proj-7.2.0/src/proj.h:325: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 version[32]; /* version of the init file */ data/proj-7.2.0/src/proj.h:326: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 origin[32]; /* origin of the file, e.g. EPSG */ data/proj-7.2.0/src/proj.h:327: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 lastupdate[16]; /* Date of last update in YYYY-MM-DD format */ data/proj-7.2.0/src/proj_internal.h:536: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 axis[4] = {0,0,0,0}; /* Axis order, pj_transform/pj_adjust_axis */ data/proj-7.2.0/src/proj_internal.h:580: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 param[1]; /* variable-length member */ data/proj-7.2.0/src/proj_json_streaming_writer.cpp:263: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 szFormatting[10]; data/proj-7.2.0/src/proj_json_streaming_writer.cpp:282: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 szFormatting[10]; data/proj-7.2.0/src/projections/chamb.cpp:105: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[10]; data/proj-7.2.0/src/projections/chamb.cpp:113:15: [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. (void)sprintf(line, "rlat_%d", i+1); data/proj-7.2.0/src/projections/chamb.cpp:115:15: [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. (void)sprintf(line, "rlon_%d", i+1); data/proj-7.2.0/src/rtodms.cpp:20:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char data/proj-7.2.0/src/rtodms.cpp:36:10: [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. (void)sprintf(format,"%%dd%%d'%%.%df\"%%c", fract); data/proj-7.2.0/src/rtodms.cpp:38:10: [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. (void)sprintf(format,"%%dd%%02d'%%0%d.%df\"%%c", data/proj-7.2.0/src/rtodms.cpp:83:9: [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. (void)sprintf(ss,"%dd%d'%c",deg,min,sign); data/proj-7.2.0/src/rtodms.cpp:85:9: [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. (void)sprintf(ss,"%dd%c",deg, sign); data/proj-7.2.0/src/sqlite3_utils.cpp:72:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. std::memcpy(&defaultClosePtr, data/proj-7.2.0/src/sqlite3_utils.cpp:101: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(methods, file->pMethods, sizeof(sqlite3_io_methods)); data/proj-7.2.0/src/sqlite3_utils.cpp:115:14: [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(reinterpret_cast<char *>(file) + defaultVFS->szOsFile, data/proj-7.2.0/src/strerrno.cpp:82:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char note[50]; data/proj-7.2.0/src/strerrno.cpp:95:9: [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(note, "no system list, errno: %d\n", data/proj-7.2.0/src/strerrno.cpp:103:54: [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. if (adjusted_err < (sizeof(pj_err_list) / sizeof(char *))) data/proj-7.2.0/src/strerrno.cpp:104:17: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. return (char *)pj_err_list[adjusted_err]; data/proj-7.2.0/src/strerrno.cpp:106: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(note, "invalid projection system error (%d)", data/proj-7.2.0/src/strtod.cpp:86: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 szBuf[16]; data/proj-7.2.0/src/strtod.cpp:87:9: [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(szBuf, "%.1f", 1.0); data/proj-7.2.0/src/strtod.cpp: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 szWorkBuffer[PJ_STRTOD_WORK_BUFFER_SIZE]; data/proj-7.2.0/src/tests/multistresstest.cpp:458:30: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num_iterations = atoi(argv[i+1]); data/proj-7.2.0/src/tracing.cpp:95:13: [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). f = fopen(traceFile, "wb"); data/proj-7.2.0/src/tracing.cpp:101:28: [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). minDelayMicroSec = atoi(minDelay); data/proj-7.2.0/src/transformations/defmodel.cpp:256:30: [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). std::unique_ptr<GridSet> open(const std::string &filename) { data/proj-7.2.0/src/transformations/defmodel.cpp:257:58: [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). auto realGridSet = NS_PROJ::GenericShiftGridSet::open(ctx, filename); data/proj-7.2.0/src/transformations/defmodel.hpp:547:30: [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). std::unique_ptr<GridSet> open(const std::string & /* filename*/) { data/proj-7.2.0/src/transformations/defmodel_impl.hpp:775:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[32]; data/proj-7.2.0/src/transformations/defmodel_impl.hpp:932: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). compEx->gridSet = iface.open(comp.spatialModel().filename); data/proj-7.2.0/src/utils.cpp:74: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 defn[512]; data/proj-7.2.0/src/utils.cpp:78:5: [2] (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). Risk is low because the source is a constant string. strcpy( defn, "+proj=latlong" ); data/proj-7.2.0/src/utils.cpp:108:13: [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( ptr, " +es=%.16g", pj_in->es ); data/proj-7.2.0/src/utils.cpp:142:9: [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( defn+strlen(defn), " +R_A" ); data/proj-7.2.0/src/utils.cpp:145:9: [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( defn+strlen(defn), " +R_V" ); data/proj-7.2.0/src/utils.cpp:148:9: [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( defn+strlen(defn), " +R_a" ); data/proj-7.2.0/src/wkt1_generated_parser.c:1060: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/proj-7.2.0/src/wkt1_generated_parser.c:1252: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 yymsgbuf[128]; data/proj-7.2.0/src/wkt2_generated_parser.c:2548: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 const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; data/proj-7.2.0/src/wkt2_generated_parser.c:2740: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 yymsgbuf[128]; data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2515: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). return fopen(path, mode); data/proj-7.2.0/test/googletest/src/gtest-death-test.cc:341: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 buffer[256]; data/proj-7.2.0/test/googletest/src/gtest-death-test.cc:762: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 executable_path[_MAX_PATH + 1]; // NOLINT data/proj-7.2.0/test/googletest/src/gtest-death-test.cc:1243: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). const int cwd_fd = open(".", O_RDONLY); data/proj-7.2.0/test/googletest/src/gtest-filepath.cc:103: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/proj-7.2.0/test/googletest/src/gtest-filepath.cc:106: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 cwd[GTEST_PATH_MAX_ + 1] = { '\0' }; data/proj-7.2.0/test/googletest/src/gtest-port.cc:135: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). const int fd = open("/proc/self/as", O_RDONLY); data/proj-7.2.0/test/googletest/src/gtest-port.cc:922: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(buffer, regex, len); data/proj-7.2.0/test/googletest/src/gtest-port.cc:996: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 temp_dir_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/proj-7.2.0/test/googletest/src/gtest-port.cc:997: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 temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT data/proj-7.2.0/test/googletest/src/gtest-port.cc:1034:29: [2] (tmpfile) mkstemp: Potential for temporary file vulnerability in some circumstances. Some older Unix-like systems create temp files with permission to write by all by default, so be sure to set the umask to override this. Also, some older Unix systems might fail to use O_EXCL when opening the file, so make sure that O_EXCL is used by the library (CWE-377). const int captured_fd = mkstemp(name_template); data/proj-7.2.0/test/googletest/src/gtest-printers.cc:65: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 text[5] = ""; data/proj-7.2.0/test/googletest/src/gtest.cc:906:7: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/proj-7.2.0/test/googletest/src/gtest.cc:909:3: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_ACP, 0, ansi, length, data/proj-7.2.0/test/googletest/src/gtest.cc:1725: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 error_text[kBufSize] = { '\0' }; data/proj-7.2.0/test/googletest/src/gtest.cc:1809: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 str[5]; // Big enough for the largest valid code point. data/proj-7.2.0/test/googletest/src/gtest.cc:4343: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[1024]; data/proj-7.2.0/test/googletest/src/gtest.cc:4349: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/proj-7.2.0/test/unit/gie_self_tests.cpp:54: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 *const args[3] = {"proj=utm", "zone=32", "ellps=GRS80"}; data/proj-7.2.0/test/unit/gie_self_tests.cpp: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 arg[50] = {"+proj=utm; +zone=32; +ellps=GRS80"}; data/proj-7.2.0/test/unit/gie_self_tests.cpp:339: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[40]; data/proj-7.2.0/test/unit/gie_self_tests.cpp:341: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 arg[50] = {"+proj=utm; +zone=32; +ellps=GRS80"}; data/proj-7.2.0/test/unit/gie_self_tests.cpp:355: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 tmpstr[64]; data/proj-7.2.0/test/unit/gie_self_tests.cpp:356:9: [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(tmpstr, "%d.%d.%d", info.major, info.minor, info.patch); data/proj-7.2.0/test/unit/pj_transform_test.cpp:623: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 header[6]; data/proj-7.2.0/test/unit/pj_transform_test.cpp:666:16: [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 *fp = fopen(filename, access); data/proj-7.2.0/test/unit/pj_transform_test.cpp:710: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 header[6]; data/proj-7.2.0/test/unit/proj_context_test.cpp:44: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 *f = fopen(filename.c_str(), "wt"); data/proj-7.2.0/test/unit/test_c_api.cpp:3996:19: [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 *f = fopen(path.c_str(), "rb"); data/proj-7.2.0/test/unit/test_c_api.cpp:4016:13: [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). f = fopen(tmp_filename.c_str(), "wb"); data/proj-7.2.0/test/unit/test_c_api.cpp:4091: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 *f = fopen(path.c_str(), "rb"); data/proj-7.2.0/test/unit/test_c_api.cpp:4110:9: [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). f = fopen(tmp_filename.c_str(), "wb"); data/proj-7.2.0/test/unit/test_defmodel.cpp:806: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). std::unique_ptr<GridSet> open(const std::string &filename) { data/proj-7.2.0/test/unit/test_defmodel.cpp:1162: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). std::unique_ptr<GridSet> open(const std::string &filename) { data/proj-7.2.0/test/unit/test_defmodel.cpp:1454: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). std::unique_ptr<GridSet> open(const std::string &filename) { data/proj-7.2.0/test/unit/test_grids.cpp:63:51: [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). auto gridSet = NS_PROJ::VerticalShiftGridSet::open(m_ctxt, "null"); data/proj-7.2.0/test/unit/test_grids.cpp:83:46: [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_EQ(NS_PROJ::VerticalShiftGridSet::open(m_ctxt, "foobar"), nullptr); data/proj-7.2.0/test/unit/test_grids.cpp:85:40: [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). NS_PROJ::VerticalShiftGridSet::open(m_ctxt, "tests/test_nodata.gtx"); data/proj-7.2.0/test/unit/test_grids.cpp:100:53: [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). auto gridSet = NS_PROJ::HorizontalShiftGridSet::open(m_ctxt, "null"); data/proj-7.2.0/test/unit/test_grids.cpp:122:42: [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). NS_PROJ::HorizontalShiftGridSet::open(m_ctxt, "tests/test_hgrid.tif"); data/proj-7.2.0/test/unit/test_grids.cpp:151:50: [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). auto gridSet = NS_PROJ::GenericShiftGridSet::open(m_ctxt, "null"); data/proj-7.2.0/test/unit/test_grids.cpp:174:45: [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_EQ(NS_PROJ::GenericShiftGridSet::open(m_ctxt, "foobar"), nullptr); data/proj-7.2.0/test/unit/test_grids.cpp:175:50: [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). auto gridSet = NS_PROJ::GenericShiftGridSet::open( data/proj-7.2.0/test/unit/test_grids.cpp:202:50: [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). auto gridSet = NS_PROJ::GenericShiftGridSet::open( data/proj-7.2.0/test/unit/test_grids.cpp:218:50: [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). auto gridSet = NS_PROJ::GenericShiftGridSet::open( data/proj-7.2.0/test/unit/test_grids.cpp:231:50: [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). auto gridSet = NS_PROJ::GenericShiftGridSet::open( data/proj-7.2.0/test/unit/test_io.cpp:8523:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if (std::abs(atoi(order1) * atoi(order2)) == 2 && data/proj-7.2.0/test/unit/test_io.cpp:8523:41: [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 (std::abs(atoi(order1) * atoi(order2)) == 2 && data/proj-7.2.0/test/unit/test_io.cpp:8524: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). !(atoi(order1) == 1 && atoi(order2) == 2)) { data/proj-7.2.0/test/unit/test_io.cpp:8524:40: [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). !(atoi(order1) == 1 && atoi(order2) == 2)) { data/proj-7.2.0/test/unit/test_io.cpp:8538: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). (atoi(order1) == 2 && atoi(order2) == 1) data/proj-7.2.0/test/unit/test_io.cpp:8538:43: [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). (atoi(order1) == 2 && atoi(order2) == 1) data/proj-7.2.0/test/unit/test_network.cpp:302: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(buffer, openEvent->response.data(), openEvent->response.size()); data/proj-7.2.0/test/unit/test_network.cpp:426: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(buffer, readRangeEvent->response.data(), data/proj-7.2.0/test/unit/test_network.cpp:453:19: [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 *f = fopen(filename.c_str(), "rb"); data/proj-7.2.0/test/unit/test_network.cpp:509:13: [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(&event->response[i * sizeof(float)], &f, sizeof(float)); data/proj-7.2.0/test/unit/test_network.cpp:562:13: [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(&event->response[i * sizeof(float)], &f, sizeof(float)); data/proj-7.2.0/test/unit/test_network.cpp:659:19: [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 *f = fopen(filename.c_str(), "rb"); data/proj-7.2.0/test/unit/test_network.cpp:775:19: [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 *f = fopen(filename.c_str(), "rb"); data/proj-7.2.0/test/unit/test_network.cpp:832:13: [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(&event->response[i * sizeof(float)], &f, sizeof(float)); data/proj-7.2.0/test/unit/test_network.cpp:932:19: [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 *f = fopen(filename.c_str(), "rb"); data/proj-7.2.0/test/unit/test_network.cpp:989:13: [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(&event->response[i * sizeof(float)], &f, sizeof(float)); data/proj-7.2.0/test/unit/test_network.cpp:1036:19: [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 *f = fopen(filename.c_str(), "rb"); data/proj-7.2.0/test/unit/test_network.cpp:1643: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 *f = fopen("proj_test_tmp/dk_sdfe_dvr90.tif", "rb"); data/proj-7.2.0/test/unit/test_network.cpp:1801:53: [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). return reinterpret_cast<PROJ_FILE_HANDLE *>(fopen( data/proj-7.2.0/include/proj/internal/internal.hpp:121: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). const size_t prefixSize = std::strlen(prefix); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:3823:21: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return std::fgetc(m_file); data/proj-7.2.0/include/proj/internal/nlohmann/json.hpp:4130: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). std::strlen(reinterpret_cast<const char*>(b))) {} data/proj-7.2.0/src/4D_api.cpp:636:52: [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). char *def = static_cast<char*>(malloc (100+strlen(P->axis))); data/proj-7.2.0/src/4D_api.cpp:649:48: [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 (!disable_grid_presence_check && p && strlen (p->param) > strlen ("geoidgrids=")) { data/proj-7.2.0/src/4D_api.cpp:649:68: [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 (!disable_grid_presence_check && p && strlen (p->param) > strlen ("geoidgrids=")) { data/proj-7.2.0/src/4D_api.cpp:650: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). char *gridnames = p->param + strlen ("geoidgrids="); data/proj-7.2.0/src/4D_api.cpp:651:54: [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). char *def = static_cast<char*>(malloc (100+2*strlen(gridnames))); data/proj-7.2.0/src/4D_api.cpp:665:48: [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 (!disable_grid_presence_check && p && strlen (p->param) > strlen ("nadgrids=")) { data/proj-7.2.0/src/4D_api.cpp:665:68: [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 (!disable_grid_presence_check && p && strlen (p->param) > strlen ("nadgrids=")) { data/proj-7.2.0/src/4D_api.cpp:666: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). char *gridnames = p->param + strlen ("nadgrids="); data/proj-7.2.0/src/4D_api.cpp:667:54: [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). char *def = static_cast<char*>(malloc (100+2*strlen(gridnames))); data/proj-7.2.0/src/4D_api.cpp:685:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t n = strlen (s); data/proj-7.2.0/src/4D_api.cpp:771:9: [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). n = strlen (definition); data/proj-7.2.0/src/4D_api.cpp:1491:14: [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). applen = strlen (app); data/proj-7.2.0/src/4D_api.cpp:1497: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). buflen = strlen (buf); data/proj-7.2.0/src/4D_api.cpp:1498:25: [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 = buflen+applen+strlen (delim) + 1; data/proj-7.2.0/src/4D_api.cpp:1665:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (grinfo.gridname, gridname, sizeof(grinfo.gridname) - 1); data/proj-7.2.0/src/4D_api.cpp:1671:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (grinfo.format, format.c_str(), sizeof(grinfo.format) - 1); data/proj-7.2.0/src/4D_api.cpp:1745:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!file_found || strlen(initname) > 64) { data/proj-7.2.0/src/4D_api.cpp:1751:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (ininfo.name, initname, sizeof(ininfo.name) - 1); data/proj-7.2.0/src/4D_api.cpp:1755:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.version, val, sizeof(ininfo.version) - 1); data/proj-7.2.0/src/4D_api.cpp:1759:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.lastupdate, val, sizeof(ininfo.lastupdate) - 1); data/proj-7.2.0/src/4D_api.cpp:1769:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (ininfo.name, initname, sizeof(ininfo.name) - 1); data/proj-7.2.0/src/4D_api.cpp:1773:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.version, val, sizeof(ininfo.version) - 1); data/proj-7.2.0/src/4D_api.cpp:1777:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.lastupdate, val, sizeof(ininfo.lastupdate) - 1); data/proj-7.2.0/src/4D_api.cpp:1786:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (ininfo.name, initname, sizeof(ininfo.name) - 1); data/proj-7.2.0/src/4D_api.cpp:1791:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (key, initname, 64); /* make room for ":metadata\0" at the end */ data/proj-7.2.0/src/4D_api.cpp:1793: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). memcpy(key + strlen(key), ":metadata", 9 + 1); data/proj-7.2.0/src/4D_api.cpp:1796:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(param + strlen(param), key, sizeof(param)-1-strlen(param)); data/proj-7.2.0/src/4D_api.cpp:1796:21: [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). strncat(param + strlen(param), key, sizeof(param)-1-strlen(param)); data/proj-7.2.0/src/4D_api.cpp:1796:57: [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). strncat(param + strlen(param), key, sizeof(param)-1-strlen(param)); data/proj-7.2.0/src/4D_api.cpp:1802:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.version, pj_param(ctx, start, "sversion").s, sizeof(ininfo.version) - 1); data/proj-7.2.0/src/4D_api.cpp:1805:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.origin, pj_param(ctx, start, "sorigin").s, sizeof(ininfo.origin) - 1); data/proj-7.2.0/src/4D_api.cpp:1808:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ininfo.lastupdate, pj_param(ctx, start, "slastupdate").s, sizeof(ininfo.lastupdate) - 1); data/proj-7.2.0/src/apps/cs2cs.cpp:98:19: [1] (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). Risk is low because the source is a constant character. (void)strcat(s, "\n"); data/proj-7.2.0/src/apps/cs2cs.cpp:100:25: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fid)) != EOF && c != '\n') data/proj-7.2.0/src/apps/geod.cpp:72:4: [1] (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). Risk is low because the source is a constant character. strcat(s, "\n"); data/proj-7.2.0/src/apps/geod.cpp:74:16: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fid)) != EOF && c != '\n') ; data/proj-7.2.0/src/apps/gie.cpp:501:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(args) > 70) data/proj-7.2.0/src/apps/gie.cpp:532:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen(grid_info.filename) == 0 ) { data/proj-7.2.0/src/apps/gie.cpp:585:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (&(T.operation[0]), F->args, MAX_OPERATION); data/proj-7.2.0/src/apps/gie.cpp:648:5: [1] (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). Risk is low because the source is a constant character. strcpy(T.crs_src, ""); data/proj-7.2.0/src/apps/gie.cpp:649:5: [1] (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). Risk is low because the source is a constant character. strcpy(T.crs_dst, ""); data/proj-7.2.0/src/apps/gie.cpp:654:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (&(T.crs_src[0]), F->args, MAX_OPERATION); data/proj-7.2.0/src/apps/gie.cpp:666:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (&(T.crs_dst[0]), F->args, MAX_OPERATION); data/proj-7.2.0/src/apps/gie.cpp:682:27: [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). axis = l->param + strlen ("axis="); data/proj-7.2.0/src/apps/gie.cpp:683:9: [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). n = strlen (axis); data/proj-7.2.0/src/apps/gie.cpp:696:27: [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). axis = l->param + strlen ("axis="); data/proj-7.2.0/src/apps/gie.cpp:697:9: [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). n = strlen (axis); data/proj-7.2.0/src/apps/gie.cpp:1045:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (args)) data/proj-7.2.0/src/apps/gie.cpp:1227: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 (tolower_err_const); data/proj-7.2.0/src/apps/gie.cpp:1231:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(lookup[i].the_err_const) > 8 && data/proj-7.2.0/src/apps/gie.cpp:1369:48: [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 (strncmp (G->next_args, G->tags[j], strlen(G->tags[j]))==0) data/proj-7.2.0/src/apps/gie.cpp:1423: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). while (strncmp (G->next_args, "<gie>", strlen("<gie>")) != 0 && data/proj-7.2.0/src/apps/gie.cpp:1424: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). strncmp (G->next_args, "<gie-strict>", strlen("<gie-strict>")) != 0 ) data/proj-7.2.0/src/apps/gie.cpp:1432:48: [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( strncmp (G->next_args, "<gie-strict>", strlen("<gie-strict>")) == 0 ) data/proj-7.2.0/src/apps/gie.cpp:1482: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 next_len = strlen (G->next_args); data/proj-7.2.0/src/apps/gie.cpp:1483: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 args_len = strlen (G->args); data/proj-7.2.0/src/apps/gie.cpp:1487:22: [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). skip_chars = strlen (tag); data/proj-7.2.0/src/apps/gie.cpp:1538:50: [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). while( G->args[0] != '\0' && G->args[strlen(G->args)-1] == '\\' ) data/proj-7.2.0/src/apps/gie.cpp:1540:25: [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). G->args[strlen(G->args)-1] = 0; data/proj-7.2.0/src/apps/optargpm.h:325:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (option)==1) { data/proj-7.2.0/src/apps/optargpm.h:345:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(f[i]) > 2) && (f[i][1]=='=') && (0==strcmp(f[i]+2, option))) { data/proj-7.2.0/src/apps/optargpm.h:365:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((strlen(v[i]) > 2) && (v[i][1]=='=') && (0==strcmp(v[i]+2, option))) { data/proj-7.2.0/src/apps/optargpm.h:427:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < (int) strlen (flags); i++) data/proj-7.2.0/src/apps/optargpm.h:431:27: [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). for (i = 0; i < (int) strlen (keys); i++) data/proj-7.2.0/src/apps/optargpm.h:445:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (longflags[i]) < 3) data/proj-7.2.0/src/apps/optargpm.h:457:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (longkeys[i]) < 3) data/proj-7.2.0/src/apps/optargpm.h:496: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). int arg_group_size = (int) strlen (argv[i]); data/proj-7.2.0/src/apps/proj.cpp:74:23: [1] (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). Risk is low because the source is a constant character. (void)strcat(s, "\n"); data/proj-7.2.0/src/apps/proj.cpp:76:29: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fid)) != EOF && c != '\n') ; data/proj-7.2.0/src/apps/proj.cpp:201:19: [1] (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). Risk is low because the source is a constant character. (void)strcat(s, "\n"); data/proj-7.2.0/src/apps/proj.cpp:203:25: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fid)) != EOF && c != '\n') ; data/proj-7.2.0/src/apps/proj.cpp:492: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). strlen("General Oblique Transformation")) == 0 ) data/proj-7.2.0/src/apps/proj_strtod.cpp:330:25: [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). for (i = m = 0, n = strlen (s); i < n; i++) { data/proj-7.2.0/src/apps/projinfo.cpp:164:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fs.read(buffer, sizeof(buffer)); data/proj-7.2.0/src/apps/utils.cpp:39:25: [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). auto oformLen = strlen(formatString); data/proj-7.2.0/src/conversions/axisswap.cpp:197:21: [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). for (i=0; i<strlen(order); i++) data/proj-7.2.0/src/datum_set.cpp:78:40: [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( pj_datums[i].ellipse_id && strlen(pj_datums[i].ellipse_id) > 0 ) data/proj-7.2.0/src/datum_set.cpp:83:13: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( entry + strlen(entry), pj_datums[i].ellipse_id, data/proj-7.2.0/src/datum_set.cpp:83: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). strncpy( entry + strlen(entry), pj_datums[i].ellipse_id, data/proj-7.2.0/src/datum_set.cpp:84:42: [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). sizeof(entry) - 1 - strlen(entry) ); data/proj-7.2.0/src/datum_set.cpp:95: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). if( pj_datums[i].defn && strlen(pj_datums[i].defn) > 0 ) data/proj-7.2.0/src/ell_set.cpp:149:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (par->param) < 7) data/proj-7.2.0/src/ell_set.cpp:427:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t l = strlen(key); data/proj-7.2.0/src/filemanager.cpp:126:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(&readLineBuffer_[prevSize], maxLen - prevSize); data/proj-7.2.0/src/filemanager.cpp:574: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). out.resize(strlen(out.c_str())); data/proj-7.2.0/src/filemanager.cpp:595:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read(void *buffer, size_t sizeBytes) override; data/proj-7.2.0/src/filemanager.cpp:614:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t FileWin32::read(void *buffer, size_t sizeBytes) { data/proj-7.2.0/src/filemanager.cpp:725:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read(void *buffer, size_t sizeBytes) override; data/proj-7.2.0/src/filemanager.cpp:744:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t FileStdio::read(void *buffer, size_t sizeBytes) { data/proj-7.2.0/src/filemanager.cpp:805:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read(void *buffer, size_t sizeBytes) override; data/proj-7.2.0/src/filemanager.cpp:824:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t FileLegacyAdapter::read(void *buffer, size_t sizeBytes) { data/proj-7.2.0/src/filemanager.cpp:873:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read(void *buffer, size_t sizeBytes) override; data/proj-7.2.0/src/filemanager.cpp:894:24: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t FileApiAdapter::read(void *buffer, size_t sizeBytes) { data/proj-7.2.0/src/filemanager.cpp:1211:26: [1] (buffer) wcslen: 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). wPath.resize(wcslen(wPath.data())); data/proj-7.2.0/src/filemanager.cpp:1340:17: [1] (buffer) wcslen: 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). wout.resize(wcslen(wout.c_str())); data/proj-7.2.0/src/filemanager.cpp:1562:17: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(out_full_filename, sysname, out_full_filename_size); data/proj-7.2.0/src/filemanager.cpp:1837:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). const auto nread = file->read(&content[0], content.size()); data/proj-7.2.0/src/filemanager.cpp:1849:13: [1] (buffer) equal: 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 (equal < eol) { data/proj-7.2.0/src/filemanager.hpp:85:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). virtual size_t read(void *buffer, size_t sizeBytes) = 0; data/proj-7.2.0/src/grids.cpp:199:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fp->read(header, sizeof(header)) != sizeof(header)) { data/proj-7.2.0/src/grids.cpp:260:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fp->read(&out, sizeof(out)) != sizeof(out)) { data/proj-7.2.0/src/grids.cpp:490:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). namePos += strlen("name=\""); data/proj-7.2.0/src/grids.cpp:500:57: [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). sample = atoi(tag.c_str() + samplePos + strlen("sample=\"")); data/proj-7.2.0/src/grids.cpp:507:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rolePos += strlen("role=\""); data/proj-7.2.0/src/grids.cpp:717:28: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return self->m_fp->read(buf, size); data/proj-7.2.0/src/grids.cpp:1381:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t header_size = fp->read(header, sizeof(header)); data/proj-7.2.0/src/grids.cpp:1572:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fp->read(header, sizeof(header)) != sizeof(header)) { data/proj-7.2.0/src/grids.cpp:1632:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fp->read(&two_doubles[0], sizeof(two_doubles)) != data/proj-7.2.0/src/grids.cpp:1694:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fp->read(header, sizeof(header)) != sizeof(header)) { data/proj-7.2.0/src/grids.cpp:1746:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fp->read(&two_floats[0], sizeof(two_floats)) != sizeof(two_floats)) { data/proj-7.2.0/src/grids.cpp:1830:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (m_fp->read(&two_float[0], sizeof(two_float)) != sizeof(two_float)) { data/proj-7.2.0/src/grids.cpp:1864:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fpRaw->read(header, sizeof(header)) != sizeof(header)) { data/proj-7.2.0/src/grids.cpp:1901:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (fpRaw->read(header, sizeof(header)) != sizeof(header)) { data/proj-7.2.0/src/grids.cpp:2323:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t header_size = fp->read(header, sizeof(header)); data/proj-7.2.0/src/grids.cpp:2695:30: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t header_size = fp->read(header, sizeof(header)); data/proj-7.2.0/src/init.cpp:98:46: [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 (MAX_PATH_FILENAME + ID_TAG_MAX + 2 < strlen (key)) { data/proj-7.2.0/src/init.cpp:102:26: [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). memmove (fname, key, strlen (key) + 1); data/proj-7.2.0/src/init.cpp:113:9: [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). n = strlen (section); data/proj-7.2.0/src/init.cpp:143:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (line.c_str()) < n + 2) data/proj-7.2.0/src/init.cpp:159: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). strcpy (buffer, line.data() + strlen (section) + 2); data/proj-7.2.0/src/init.cpp:182:25: [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). buffer_length = strlen (buffer); data/proj-7.2.0/src/init.cpp:184: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). next_length = strlen (line.data()) + buffer_length + 2; data/proj-7.2.0/src/init.cpp:242:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(initname, xkey, 4); data/proj-7.2.0/src/init.cpp:266: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). if( strlen(xkey) > 64 ) { data/proj-7.2.0/src/init.cpp:285:43: [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). definition = (char*)calloc(1, strlen(proj_string)+1); data/proj-7.2.0/src/init.cpp:331:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (proj->param) < 6) data/proj-7.2.0/src/init.cpp:427:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). defn_copy = (char *) pj_malloc( strlen(definition)+1 ); data/proj-7.2.0/src/init.cpp:607:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen (name) < 6) { data/proj-7.2.0/src/init.cpp:704:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen(axis_arg) != 3 ) data/proj-7.2.0/src/initcache.cpp:51:31: [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). pj_malloc(sizeof(paralist) + strlen(list->param)); data/proj-7.2.0/src/initcache.cpp:176:49: [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). cache_key[cache_count] = (char *) pj_malloc(strlen(filekey)+1); data/proj-7.2.0/src/internal.cpp:174:9: [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). n = strlen (c); data/proj-7.2.0/src/internal.cpp:186:9: [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). n = strlen (start); data/proj-7.2.0/src/internal.cpp:213:9: [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). n = strlen (c); data/proj-7.2.0/src/internal.cpp:260:9: [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). n = strlen(c); data/proj-7.2.0/src/internal.cpp:298:9: [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). n = strlen (args); data/proj-7.2.0/src/internal.cpp:354: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 nLen = strlen(str); data/proj-7.2.0/src/internal.cpp:387:17: [1] (buffer) equal: 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( equal ) { data/proj-7.2.0/src/iso19111/c_api.cpp:402:25: [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 option + strlen(keyWithEqual); data/proj-7.2.0/src/iso19111/c_api.cpp:2896: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). name.resize(name.size() - strlen(" (deprecated)")); data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:1008:43: [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). l_name.resize(l_name.size() - strlen(" (3D)")); data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:4969: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). authName = authName.substr(strlen("INVERSE(")); data/proj-7.2.0/src/iso19111/coordinateoperation.cpp:13874: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). model, modelName.substr(strlen("PROJ ")))} data/proj-7.2.0/src/iso19111/crs.cpp:711:47: [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). newNameMod.resize(newNameMod.size() - strlen(" (deprecated)")); data/proj-7.2.0/src/iso19111/factory.cpp:518:21: [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). path.resize(strlen(path.c_str())); data/proj-7.2.0/src/iso19111/factory.cpp:989:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). fullFilename.resize(strlen(fullFilename.c_str())); data/proj-7.2.0/src/iso19111/factory.cpp:2292: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). createMeridian(orientation.substr(strlen("North along "))); data/proj-7.2.0/src/iso19111/factory.cpp:2296: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). createMeridian(orientation.substr(strlen("South along "))); data/proj-7.2.0/src/iso19111/factory.cpp:5730:52: [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). searchedNameWithoutDeprecated.size() - strlen(" (deprecated)")); data/proj-7.2.0/src/iso19111/internal.cpp:97: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). if (size != strlen(b)) { data/proj-7.2.0/src/iso19111/internal.cpp:104: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). const auto size = strlen(a); data/proj-7.2.0/src/iso19111/internal.cpp:105: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). if (size != strlen(b)) { data/proj-7.2.0/src/iso19111/internal.cpp:164:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t needleSize = strlen(needle); data/proj-7.2.0/src/iso19111/internal.cpp:212:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const auto str_size = strlen(str); data/proj-7.2.0/src/iso19111/internal.cpp:213: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). const auto prefix_size = strlen(prefix); data/proj-7.2.0/src/iso19111/io.cpp:779: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). name.substr(0, name.size() - strlen(suffix))) + data/proj-7.2.0/src/iso19111/io.cpp:1484:42: [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). codeSpace = codeSpace.substr(strlen("INVERSE(")); data/proj-7.2.0/src/iso19111/io.cpp:1561: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). name = name.substr(strlen("Inverse of ")); data/proj-7.2.0/src/iso19111/io.cpp:1565:39: [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). name.resize(name.size() - strlen(" (deprecated)")); data/proj-7.2.0/src/iso19111/io.cpp:1578:39: [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). name.substr(pos + strlen(" (EPSG ID "), data/proj-7.2.0/src/iso19111/io.cpp:1579:57: [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). name.size() - 1 - pos - strlen(" (EPSG ID ")); data/proj-7.2.0/src/iso19111/io.cpp:4119:62: [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). sourceTransformationCRSName.size() - strlen(" (ftUS)")); data/proj-7.2.0/src/iso19111/io.cpp:4123:62: [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). sourceTransformationCRSName.size() - strlen(" depth")); data/proj-7.2.0/src/iso19111/io.cpp:4249: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). geoidName = name.substr(strlen(prefix)); data/proj-7.2.0/src/iso19111/io.cpp:4861:56: [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). transf->method()->nameStr().substr(strlen(prefix)); data/proj-7.2.0/src/iso19111/io.cpp:4880: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). strlen("PROJ-based operation method: ")); data/proj-7.2.0/src/iso19111/io.cpp:5195: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). codeSpace = codeSpace.substr(strlen("INVERSE(")); data/proj-7.2.0/src/iso19111/io.cpp:5221:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name = name.substr(strlen("Inverse of ")); data/proj-7.2.0/src/iso19111/io.cpp:6012:49: [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 (strncmp(textWithoutPlusPrefix, "proj=", strlen("proj=")) == 0 || data/proj-7.2.0/src/iso19111/io.cpp:6015:49: [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). strncmp(textWithoutPlusPrefix, "init=", strlen("init=")) == 0 || data/proj-7.2.0/src/iso19111/io.cpp:6018:50: [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). strncmp(textWithoutPlusPrefix, "title=", strlen("title=")) == 0) { data/proj-7.2.0/src/iso19111/io.cpp:7484:57: [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). d->indentLevel_ * d->indentWidth_ + strlen("+step "), ' '); data/proj-7.2.0/src/iso19111/io.cpp:7608: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). auto stepName = word.substr(strlen("proj=")); data/proj-7.2.0/src/iso19111/io.cpp:7612: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). auto initName = word.substr(strlen("init=")); data/proj-7.2.0/src/iso19111/io.cpp:7620:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). title = word.substr(strlen("title=")); data/proj-7.2.0/src/iso19111/io.cpp:7669:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). auto stepName = word.substr(strlen("proj=")); data/proj-7.2.0/src/iso19111/io.cpp:7673:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). auto initName = word.substr(strlen("init=")); data/proj-7.2.0/src/iso19111/io.cpp:7677:33: [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). title = word.substr(strlen("title=")); data/proj-7.2.0/src/iso19111/io.cpp:9931:25: [1] (buffer) equal: 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 (equal && data/proj-7.2.0/src/iso19111/metadata.cpp:1157:39: [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). strncmp(c_str, pair.utf8, strlen(pair.utf8)) == 0) { data/proj-7.2.0/src/iso19111/metadata.cpp:1187:22: [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). i += strlen(replacement->utf8) - 1; data/proj-7.2.0/src/iso19111/metadata.cpp:1246:22: [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). i += strlen(replacement->utf8) - 1; data/proj-7.2.0/src/iso19111/metadata.cpp:1253:22: [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). j += strlen(replacement->utf8) - 1; data/proj-7.2.0/src/malloc.cpp:147: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(str) + 1; data/proj-7.2.0/src/networkfilemanager.cpp:102:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(ms * 1000); data/proj-7.2.0/src/networkfilemanager.cpp:1254:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t read(void *buffer, size_t sizeBytes) override; data/proj-7.2.0/src/networkfilemanager.cpp:1315: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). errorBuffer.resize(strlen(errorBuffer.data())); data/proj-7.2.0/src/networkfilemanager.cpp:1345:21: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size_t NetworkFile::read(void *buffer, size_t sizeBytes) { data/proj-7.2.0/src/networkfilemanager.cpp:1418: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). errorBuffer.resize(strlen(errorBuffer.data())); data/proj-7.2.0/src/networkfilemanager.cpp:1555:21: [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). path.resize(strlen(path.c_str())); data/proj-7.2.0/src/networkfilemanager.cpp:1567:21: [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). path.resize(strlen(path.c_str())); data/proj-7.2.0/src/networkfilemanager.cpp:1584:21: [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). path.resize(strlen(path.c_str())); data/proj-7.2.0/src/networkfilemanager.cpp:1883: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). pos += strlen(header_name); data/proj-7.2.0/src/networkfilemanager.cpp:2283:40: [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). errorBuffer.resize(strlen(errorBuffer.data())); data/proj-7.2.0/src/networkfilemanager.cpp:2410:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). errorBuffer.resize(strlen(errorBuffer.data())); data/proj-7.2.0/src/param.cpp:14: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(param_str); data/proj-7.2.0/src/param.cpp:17:9: [1] (buffer) equal: 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( equal && equal - param_str + 1 > 2 && param_str[len-1] == '"' ) { data/proj-7.2.0/src/param.cpp:41:60: [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((newitem = (paralist *)pj_malloc(sizeof(paralist) + strlen(str))) != nullptr) { data/proj-7.2.0/src/param.cpp:115: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 (parameter); data/proj-7.2.0/src/param.cpp:196: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). l = (int) strlen(opt); data/proj-7.2.0/src/pr_list.cpp:19: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). l = (int)strlen(t->param) + 1; data/proj-7.2.0/src/pr_list.cpp:81: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). l = (int)strlen(t->param) + 1; data/proj-7.2.0/src/pr_list.cpp:82:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen(definition) + l + 5 > def_max ) data/proj-7.2.0/src/proj_json_streaming_writer.cpp:55: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). res.resize(strlen(&res[0])); data/proj-7.2.0/src/rtodms.cpp:77:21: [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). for (q = p = ss + strlen(ss) - suffix_len; *p == '0'; --p) ; data/proj-7.2.0/src/strtod.cpp: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). if( strlen(pszNumber) < PJ_STRTOD_WORK_BUFFER_SIZE ) data/proj-7.2.0/src/strtod.cpp:125:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if( strlen(pszNumber) < PJ_STRTOD_WORK_BUFFER_SIZE ) data/proj-7.2.0/src/transform.cpp:889: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). strlen("General Oblique Transformation")) == 0 ) data/proj-7.2.0/src/transform.cpp:1008: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). strlen("General Oblique Transformation")) == 0 ) data/proj-7.2.0/src/transformations/defmodel.cpp:426:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file->read(&jsonStr[0], jsonStr.size()) != jsonStr.size()) { data/proj-7.2.0/src/transformations/horner.cpp:415:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf = static_cast<char*>(pj_calloc (strlen (param) + 2, sizeof(char))); data/proj-7.2.0/src/transformations/tinshift.cpp:110:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (file->read(&jsonStr[0], jsonStr.size()) != jsonStr.size()) { data/proj-7.2.0/src/utils.cpp:83: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). sprintf( defn+strlen(defn), " +datum=%s", data/proj-7.2.0/src/utils.cpp:88: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). sprintf( defn+strlen(defn), " +ellps=%s", data/proj-7.2.0/src/utils.cpp:93: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). sprintf( defn+strlen(defn), " +a=%s", data/proj-7.2.0/src/utils.cpp:97:27: [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). sprintf( defn+strlen(defn), " +b=%s", data/proj-7.2.0/src/utils.cpp:100:27: [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). sprintf( defn+strlen(defn), " +es=%s", data/proj-7.2.0/src/utils.cpp:103:27: [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). sprintf( defn+strlen(defn), " +f=%s", data/proj-7.2.0/src/utils.cpp:107: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). char* ptr = defn+strlen(defn); data/proj-7.2.0/src/utils.cpp:128:27: [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). sprintf( defn+strlen(defn), " +towgs84=%s", data/proj-7.2.0/src/utils.cpp:132:27: [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). sprintf( defn+strlen(defn), " +nadgrids=%s", data/proj-7.2.0/src/utils.cpp:138: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). sprintf( defn+strlen(defn), " +R=%s", data/proj-7.2.0/src/utils.cpp:142: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). sprintf( defn+strlen(defn), " +R_A" ); data/proj-7.2.0/src/utils.cpp:145: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). sprintf( defn+strlen(defn), " +R_V" ); data/proj-7.2.0/src/utils.cpp:148: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). sprintf( defn+strlen(defn), " +R_a" ); data/proj-7.2.0/src/utils.cpp:151: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). sprintf( defn+strlen(defn), " +R_lat_a=%s", data/proj-7.2.0/src/utils.cpp:155: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). sprintf( defn+strlen(defn), " +R_lat_g=%s", data/proj-7.2.0/src/utils.cpp:160: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). sprintf( defn+strlen(defn), " +pm=%s", data/proj-7.2.0/src/wkt1_generated_parser.c:960:21: [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 yystrlen strlen data/proj-7.2.0/src/wkt1_parser.cpp:121: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). !isalpha(pszInput[strlen(tokens[i].pszToken)])) { data/proj-7.2.0/src/wkt1_parser.cpp:122:47: [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). context->pszNext = pszInput + strlen(tokens[i].pszToken); data/proj-7.2.0/src/wkt2_generated_parser.c:2448:21: [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 yystrlen strlen data/proj-7.2.0/src/wkt2_parser.cpp:150: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). !isalpha(pszInput[strlen(tokens[i].pszToken)])) { data/proj-7.2.0/src/wkt2_parser.cpp:151:47: [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). context->pszNext = pszInput + strlen(tokens[i].pszToken); data/proj-7.2.0/src/wkt2_parser.cpp:207:43: [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). context->pszNext = pszInput + strlen(pszInput); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2504:10: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). return strncpy(dest, src, n); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-port.h:2526:27: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return static_cast<int>(read(fd, buf, count)); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-type-util.h:67:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (s.compare(0, strlen(prefix), prefix) == 0) { data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-type-util.h:68:47: [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). std::string::size_type end = s.find("::", strlen(prefix)); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-type-util.h:71: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). s.erase(strlen("std"), end - strlen("std")); data/proj-7.2.0/test/googletest/include/gtest/internal/gtest-type-util.h:71: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). s.erase(strlen("std"), end - strlen("std")); data/proj-7.2.0/test/googletest/src/gtest-port.cc:656:33: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t full_regex_len = strlen(regex) + 10; data/proj-7.2.0/test/googletest/src/gtest-port.cc:910:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t len = strlen(regex); data/proj-7.2.0/test/googletest/src/gtest-printers.cc:334:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). PrintCharsAsStringTo(s, strlen(s), os); data/proj-7.2.0/test/googletest/src/gtest-printers.cc:351:34: [1] (buffer) wcslen: 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). PrintCharsAsStringTo(s, std::wcslen(s), os); data/proj-7.2.0/test/googletest/src/gtest.cc:904:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const int length = strlen(ansi); data/proj-7.2.0/test/googletest/src/gtest.cc:1870:34: [1] (buffer) wcslen: 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). num_chars = static_cast<int>(wcslen(str)); data/proj-7.2.0/test/googletest/src/gtest.cc:3662: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). segment = next_segment + strlen("]]>"); data/proj-7.2.0/test/googletest/src/gtest.cc:4247: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). result.reserve(strlen(str) + 1); data/proj-7.2.0/test/googletest/src/gtest.cc:5566:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t prefix_len = strlen(prefix); data/proj-7.2.0/test/googletest/src/gtest.cc:5977:21: [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). else if (temp_dir[strlen(temp_dir) - 1] == '\\') ANALYSIS SUMMARY: Hits = 768 Lines analyzed = 237157 in approximately 6.23 seconds (38094 lines/second) Physical Source Lines of Code (SLOC) = 164912 Hits@level = [0] 285 [1] 254 [2] 325 [3] 71 [4] 116 [5] 2 Hits@level+ = [0+] 1053 [1+] 768 [2+] 514 [3+] 189 [4+] 118 [5+] 2 Hits/KSLOC@level+ = [0+] 6.38522 [1+] 4.65703 [2+] 3.11681 [3+] 1.14607 [4+] 0.715533 [5+] 0.0121277 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.