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/postgis-3.1.0~alpha3+dfsg/postgis_revision.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwrandom.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_log.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_transform.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwchaikins.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/effectivearea.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwlinearreferencing.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_twkb.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpoly.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic_tree.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_kml.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_in_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_algorithm.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_wrapx.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_force_dims.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tree.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_buildarea.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_bytebuffer.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic_data.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_in_wkt.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_iterator.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_svg.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_x3d.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_in_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_homogenize.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_clip_by_rect.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_measures.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_clean.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_encoded_polyline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_lwstroke.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_varint.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_gserialized1.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_ptarray.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geos_cluster.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_unionfind.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_force_sfs.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_split.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_triangulate.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_misc.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_chaikin.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_minimum_bounding_circle.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_gml.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_sfcgal.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_gserialized2.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_node.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_in_encoded_polyline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_in_twkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_twkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_effectivearea.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_out_wkt.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_print.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_filterm.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geos.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_stringbuffer.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmval.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwiterator.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmpoint.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcompound.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwboundingcircle.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_lex.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmcurve.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpoint.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcircstring.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_wkt.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_wrapx.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwinline.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwtree.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcurvepoly.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwhomogenize.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpsurface.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/measures3d.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/varint.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwunionfind.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_clean.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_sfcgal.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/liblwgeom_topo_internal.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/measures.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_node.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_x3d.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_twkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwspheroid.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_split.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmpoly.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_encoded_polyline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic_tree.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_median.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/liblwgeom_topo.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmsurface.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/effectivearea.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwtriangle.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_cluster.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_twkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_kml.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwrandom.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_x3d.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/liblwgeom_internal.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwtin.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_sfcgal.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lookup3.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwalgorithm.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/measures.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/measures3d.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/varint.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwunionfind.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcollection.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwkmeans.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_topo.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_encoded_polyline.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic.h
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwtree.c
Examining data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_sqlmm.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_accum.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_centroid.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_transform.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_window.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos_prepared.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_measurement_trees.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/brin_nd.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos_clean.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_geohash.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos_relatematch.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_analytic.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_rectree.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/brin_2d.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/postgis_brin.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_inout.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_inout.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geobuf.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/postgis_libprotobuf.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_basic.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dumppoints.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_3d.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geobuf.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_rtree.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/sqldefines.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_measurement.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/postgis_module.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_temporal.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/postgis_legacy.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_kml.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos_prepared.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_measurement_trees.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_supportfn.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_mvt.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_geojson.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_export.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_accum.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_spheroid.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_encoded_polyline.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_generate_grid.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_3d.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geobuf.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_rtree.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_lrs.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_2d.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_2d.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_triggers.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geography_btree.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/geometry_inout.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_btree.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_analytic.h
Examining data/postgis-3.1.0~alpha3+dfsg/postgis/brin_common.c
Examining data/postgis-3.1.0~alpha3+dfsg/deps/uthash/include/uthash.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s_full_table.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2fixed_full_table.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s_intrinsics.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/digit_table.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/ryu/ryu.h
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/lwgeom_wagyu.cpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/feature.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry_io.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/multi_line_string.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/envelope.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/empty.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/point_arithmetic.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/line_string.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/point.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/multi_polygon.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/polygon.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/for_each_point.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/active_bound_list.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/interrupt.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/build_edges.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/point.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/build_local_minima_list.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/process_maxima.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/vatti.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/process_horizontal.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/local_minimum.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/edge.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/config.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/scanbeam.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/almost_equal.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/wagyu.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/intersect.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/ring.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/local_minimum_util.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/util.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/build_result.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/bubble_sort.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/ring_util.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/bound.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/snap_rounding.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/intersect_util.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/topology_correction.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/wagyu/quick_clip.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/geometry.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/multi_point.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/include/mapbox/geometry/box.hpp
Examining data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/lwgeom_wagyu.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/gserialized_gist.c
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/common.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/gserialized_gist.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/shared_gserialized.c
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/pgsql_compat.h
Examining data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.h
Examining data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.h
Examining data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c
Examining data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c
Examining data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/wkbtest.h
Examining data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c
Examining data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_band_basics.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_basics.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_gdal.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_tester.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_spatial_relationship.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_misc.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_pixtype.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_band_stats.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_geometry.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_band_misc.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_tester.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_misc.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_mapalgebra.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_pixel.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_mapalgebra.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/librtcore.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/librtcore_internal.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_geometry.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_statistics.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_spatial_relationship.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_inout.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_spatial_relationship.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_gdal.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_geometry.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_legacy.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.h
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_wkb.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_create.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_raster_properties.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_pixel.c
Examining data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_pgsql2shp.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_tester.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_shp2pgsql.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_tester.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_pgsql2shp.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/cunit/cu_shp2pgsql.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/getopt.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-cli.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/safileio.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-cli.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shapefil.h
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/getopt.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c
Examining data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/proj_stub.h
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/geojson_import_fuzzer.cpp
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/geos_stub.h
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/fuzzingengine.c
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/wkb_import_fuzzer.cpp
Examining data/postgis-3.1.0~alpha3+dfsg/fuzzers/wkt_import_fuzzer.cpp
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_parser.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_std_api.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/khash.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-stcities.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/analyze.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/hash.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/gamma.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_common.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-regex.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/gamma.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/err_param.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c
Examining data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/hash.c
Examining data/postgis-3.1.0~alpha3+dfsg/sfcgal/lwgeom_sfcgal.c
Examining data/postgis-3.1.0~alpha3+dfsg/sfcgal/lwgeom_sfcgal.h

FINAL RESULTS:

data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1188:5:  [5] (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. Risk is high; the length parameter
  appears to be a constant, instead of computing the number of characters
  left.
				strncat(name, "__", MAXFIELDNAMELEN - 1);
data/postgis-3.1.0~alpha3+dfsg/deps/uthash/include/uthash.h:522:29:  [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 HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:53:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  int ret = system(cmd);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:85:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "%s,%s", x, y);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:118:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "-fill %s -strokewidth 0 ", styles->pointColor);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:119:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "-draw \"circle %s,%s %s,%s", x, y1, x, y2);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:142:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "-fill none -stroke %s -strokewidth %d ", style->lineColor, style->lineWidth);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:168:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "-fill %s -stroke %s -strokewidth %d ", style->polygonFillColor, style->polygonStrokeColor, style->polygonStrokeWidth );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:270:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "convert %s -depth 8 %s", filename, filename);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:283:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(str, "convert tmp[0-9].png -background white -flatten %s", filename);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:354:2:  [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( filename, image_path );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:370:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf( ptr, "convert -size %s xc:none ", imageSize );
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:220:24:  [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).
    if (paddr->city) { strcat(macro, paddr->city); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:221:24:  [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).
    if (paddr->st  ) { strcat(macro, paddr->st  ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:222:24:  [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).
    if (paddr->zip ) { strcat(macro, paddr->zip ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:223:24:  [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).
    if (paddr->cc  ) { strcat(macro, paddr->cc  ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/analyze.c:1463:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf( __err_param__->error_buf , "\t(%d) std: %s, tok: %d (%s)\n" , lex_pos , (( __def__->Protect )? __stand_param__->lex_vector[lex_pos].Text : __def__->Standard) , __def__->Type , in_symb_name( __def__->Type ));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/analyze.c:1493:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf( __err_param__->error_buf , "\t(%d) Input %d (%s) text %s mapped to output %d (%s)\n" , lex_pos , __def__->Type , in_symb_name( __def__->Type ) , (( __def__->Protect )? __stand_param__->lex_vector[lex_pos].Text : __def__->Standard ) , k , (( k == FAIL )? "NONE" : out_symb_name( k ))) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/err_param.c:251:10:  [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( err_p -> err_array[ i ] . content_buf ,
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:429:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy( __dest_buf__ , __stan_str__ ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1020:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
   sprintf( WHERE -> error_buf , \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1025:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
   sprintf( WHERE -> error_buf , \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1031:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
   sprintf( WHERE -> error_buf , \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1038:4:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
   sprintf( WHERE -> error_buf , \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1065:4:  [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( stderr , MSG ) ; \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1081:4:  [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(DEST,SRC)
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1159:4:  [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( TARGET , SOURCE_A ) ; \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:217: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(ret->st, ep->data);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:640: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(sql, tab);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:763: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(sql, tab);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:310:10:  [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( unstandard_mic ,
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:318:10:  [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( unstandard_mac_left ,
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:915:4:  [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( L -> Text ,
data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c:89:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(query,"SELECT authid FROM \"%s\" WHERE expires >= now() AND toid = '%d' AND rid = '%s'", authtable, trigdata->tg_relation->rd_id, pk_id);
data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c:132:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(query, "SELECT * FROM temp_lock_have_table WHERE xideq( transid, getTransactionID() ) AND lockcode ='%s'", lockcode);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c:137:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(query_str, "DECLARE mycursor BINARY CURSOR FOR select text(num), asbinary(the_geom,'ndr') as wkb from %s", table_name);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c:139:2:  [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(query_str);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_measures.c:59:3:  [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(msg2, in1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_measures.c:64:3:  [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(msg2, in2);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_measures.c:77:3:  [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(msg1, distance, expected_res, line);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:282:3:  [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.
  vsnprintf (cu_error_msg, MAX_CUNIT_MSG_LENGTH, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:291:3:  [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.
  vsnprintf (buf, MAX_CUNIT_MSG_LENGTH, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:300:3:  [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.
  vsnprintf (buf, MAX_CUNIT_MSG_LENGTH, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.h:52:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(msg,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:46:5:  [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.
    snprintf(ptr, 256, LIBLWGEOM_VERSION" " xstr(POSTGIS_REVISION));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:63:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result, "%*.s%s[%s]",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:78:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result, "%*.s%s[%s] with %d points",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:101:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result, "%*.s%s[%s] with %d element%s",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:116:16:  [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).
		if ( i > 0 ) strcat(result,nl);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:118:3:  [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(result, tmp);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:142:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result, "%*.s%s[%s] with %i ring%s",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:152:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp,"%s   ring %i has %i points",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:154:16:  [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).
		if ( i > 0 ) strcat(result,nl);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:155:3:  [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(result,tmp);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:49:39:  [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.
	if (LWGEOM_GEOS_ERRMSG_MAXSIZE - 1 < vsnprintf(lwgeom_geos_errmsg, LWGEOM_GEOS_ERRMSG_MAXSIZE - 1, fmt, ap))
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_topo.c:4341:13:  [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.
        r = snprintf(ptr, bufleft, "%s%" LWTFMT_ELEMID,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_topo.c:4393: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.
          r = snprintf(ptr, bufleft, "%s%" LWTFMT_ELEMID,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_geojson.c:448: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(*srs, pszName);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.c:944: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/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:114:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "\"properties\":{\"name\":\"%s\"}},", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:125:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sBox", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:127:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:155:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, "<%sBox srsName=\"%s\">", prefix, srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:156:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else       ptr += sprintf(ptr, "<%sBox>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:158:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%scoordinates>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:160:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%scoordinates></%sBox>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:186:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sEnvelope", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:187:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:212:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sEnvelope", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:213:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:217:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%slowerCorner>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:219:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%slowerCorner>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:227:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%supperCorner>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:229:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%supperCorner>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:231:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sEnvelope>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:315:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sPoint", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:316:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:323:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%scoordinates>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:325:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%scoordinates></%sPoint>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:358:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sLineString", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:359:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:368:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%scoordinates>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:370:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%scoordinates></%sLineString>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:412:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sPolygon", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:413:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:420:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%souterBoundaryIs><%sLinearRing><%scoordinates>",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:423:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%scoordinates></%sLinearRing></%souterBoundaryIs>", prefix, prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:426:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sinnerBoundaryIs><%sLinearRing><%scoordinates>", prefix, prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:428:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%scoordinates></%sLinearRing></%sinnerBoundaryIs>", prefix, prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:430:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sPolygon>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:508:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%s%s", prefix, gmltype);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:509:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:523:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%spointMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:525:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%spointMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:529:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%slineStringMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:531:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%slineStringMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:535:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%spolygonMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:537:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%spolygonMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:542:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%s%s>", prefix, gmltype);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:620:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sMultiGeometry", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:621:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:634:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sgeometryMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:654:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sgeometryMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:658:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sMultiGeometry>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:699:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "%s,%s", x, y);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:712:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "%s,%s,%s", x, y, z);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:806:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sPoint", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:807:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( srs ) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:808:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if ( id )  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:816:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%spos srsDimension=\"%d\">", prefix, dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:817:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else         ptr += sprintf(ptr, "<%spos>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:819:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%spos></%sPoint>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:873:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sLineString", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:877:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sCurve", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:880:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:881:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:892:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%ssegments>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:893:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sLineStringSegment>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:898:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:903:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:908:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:912:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sLineString>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:916:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sLineStringSegment>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:917:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%ssegments>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:918:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sCurve>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:959:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sCurve", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:962:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:966:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:969:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%ssegments>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:970:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sArcString>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:971:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sposList", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:980:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:981:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sArcString>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:982:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%ssegments>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:983:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sCurve>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1033:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sPolygonPatch", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1038:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sPolygon", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1041:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1042:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1051:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sexterior><%sLinearRing>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1052:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1053:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else         ptr += sprintf(ptr, "<%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1056:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sposList></%sLinearRing></%sexterior>",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1060:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sinterior><%sLinearRing>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1061:29:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1062:23:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		else         ptr += sprintf(ptr, "<%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1064:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sposList></%sLinearRing></%sinterior>",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1067:23:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (is_patch) ptr += sprintf(ptr, "</%sPolygonPatch>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1068:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else ptr += sprintf(ptr, "</%sPolygon>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1144:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "<%sCurve", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1147:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1151:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1154:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "<%ssegments>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1166:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sLineStringSegment><%sposList", prefix, prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1173:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sposList></%sLineStringSegment>", prefix, prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1177:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sArcString><%sposList" , prefix, prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1184:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sposList></%sArcString>", prefix, prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1188:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "</%ssegments>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1189:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "</%sCurve>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1262:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "<%sPolygon", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1265:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1269:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1277:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sexterior>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1281:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sinterior>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1287:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sLinearRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1288:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sposList", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1295:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sposList>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1296:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sLinearRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1300:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1301:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1303:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1304:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1308:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%sRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1309:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "<%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1311:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1312:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sRing>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1317:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sexterior>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1321:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf( ptr, "</%sinterior>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1325:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "</%sPolygon>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1364:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sTriangle", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1365:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1366:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1369:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sexterior><%sLinearRing>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1370:28:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (IS_DIMS(opts)) ptr += sprintf(ptr, "<%sposList srsDimension=\"%d\">", prefix, dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1371:22:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else         ptr += sprintf(ptr, "<%sposList>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1374:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sposList></%sLinearRing></%sexterior>",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1377:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sTriangle>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1459:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%s%s", prefix, gmltype);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1460:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1461:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1475:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%spointMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1477:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%spointMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1481:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%scurveMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1483:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%scurveMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1487:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "<%ssurfaceMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1489:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "</%ssurfaceMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1494:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%s%s>", prefix, gmltype);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1545:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sPolyhedralSurface", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1546:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1547:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1548:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "><%spolygonPatches>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1556:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%spolygonPatches></%sPolyhedralSurface>",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1608:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sTin", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1609:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1610:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1611:15:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else	 ptr += sprintf(ptr, "><%strianglePatches>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1620:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%strianglePatches></%sTin>", prefix, prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1688:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sMultiGeometry", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1689:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (srs) ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1690:18:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (id)  ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1702:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%sgeometryMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1725:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%sgeometryMember>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1729:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sMultiGeometry>", prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1782:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "<%sMultiCurve", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1785:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1789:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1795:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "<%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1809:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "</%scurveMember>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1811:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr, "</%sMultiCurve>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1855:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "<%sMultiSurface", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1858:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " srsName=\"%s\"", srs);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1862:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, " %sid=\"%s\"", prefix, id );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1878:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf( ptr, "</%sMultiSurface>", prefix );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1918:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				ptr += sprintf(ptr, "%s %s", y, x);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1920:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				ptr += sprintf(ptr, "%s %s", x, y);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1935:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				ptr += sprintf(ptr, "%s %s %s", y, x, z);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1937:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				ptr += sprintf(ptr, "%s %s %s", x, y, z);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:131:21:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (circle) ptr += sprintf(ptr, "x=\"%s\" y=\"%s\"", x, y);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:132:14:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	else ptr += sprintf(ptr, "cx=\"%s\" cy=\"%s\"", x, y);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:558:9:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	ptr += sprintf(ptr,"%s %s l", sx, sy);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:582:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr," %s %s", sx, sy);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:615:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr,"%s %s", x, y);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:346:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(pieces[compass_dir_piece], is_negative ? neg_dir_symbol : pos_dir_symbol);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:387:2:  [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(result, pieces[0]);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:390:3:  [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(result, pieces[index]);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:416:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result, "%s %s", lat_text, lon_text);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:120:2:  [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.
	vsnprintf (msg, LW_MSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:135:3:  [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.
		vsnprintf(msg+i, LW_MSG_MAXLEN-i, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:145:2:  [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.
	vsnprintf (msg, LW_MSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.c:188:8:  [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.
	len = vsnprintf(s->str_end, maxlen, fmt, ap2);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.c:208:9:  [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.
		len = vsnprintf(s->str_end, maxlen, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:247:2:  [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.
	vsnprintf (errmsg, PGC_ERRMSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:258:2:  [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.
	vsnprintf (errmsg, PGC_ERRMSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:269:2:  [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.
	vsnprintf (errmsg, PGC_ERRMSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:279:2:  [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.
	vsnprintf (errmsg, PGC_ERRMSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:116:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ostr, str);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:141:2:  [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.
	snprintf(proj_spi_buffer, spibufferlen, proj_str_tmpl, postgis_spatial_ref_sys(), srid);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:57:14:  [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 snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:57: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.
#     define snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:60:11:  [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.
#  ifndef snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:61:14:  [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 snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:61: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.
#     define snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:65:20:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
#define CPLsprintf sprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:66:21:  [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 CPLsnprintf snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:512: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( psDBF->pszCodePage, REINTERPRET_CAST(char *, pabyBuf) );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:770: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( psDBF->pszCodePage, pszCodePage );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:546:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query,
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:553:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query,
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:751:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query, "SELECT COALESCE((SELECT sr.srtext "
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:761:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query, "SELECT COALESCE((SELECT sr.srtext "
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:809: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( pszBasename, pszFilename );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:819:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf( pszFullname, "%s.prj", pszBasename );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:885:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(query, "SELECT count(1), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\".\"%s\" GROUP BY 3",
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:892:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(query, "SELECT count(1), max(ST_zmflag(\"%s\"::geometry)), geometrytype(\"%s\"::geometry) FROM \"%s\" GROUP BY 3",
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:903:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(query, "SELECT count(1) FROM \"%s\".\"%s\"", state->schema, state->table);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:909:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(query, "SELECT count(1) FROM \"%s\"", state->table);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1198:3:  [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(connstring, conn->host);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1204:3:  [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(connstring, conn->port);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1210:3:  [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(connstring, conn->username);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1216:3:  [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(connstring, conn->password);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1223:3:  [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(connstring, conn->database);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1359:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query, "CREATE TEMP TABLE \"%s\" AS %s", state->table, state->config->usrquery);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1385:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query, "SELECT a.attname, a.atttypid, "
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1397:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(query, "SELECT a.attname, a.atttypid, "
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1866:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "%s::text", quote_identifier(state->pgfieldnames[i]) ) ;
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1868:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "%s", quote_identifier(state->pgfieldnames[i]) );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1870:3:  [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(state->main_scan_query, buf);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1883:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "ST_asEWKB(ST_SetSRID(%s::geometry, 0), 'XDR') AS _geoX", quote_identifier(state->geo_col_name) );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1887:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "asbinary(%s::geometry, 'XDR') AS _geoX",
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1893:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "ST_AsEWKB(ST_SetSRID(%s::geometry, 0), 'NDR') AS _geoX", quote_identifier(state->geo_col_name) ) ;
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1897:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(buf, "asbinary(%s::geometry, 'NDR') AS _geoX",
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1902:3:  [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(state->main_scan_query, buf);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1907:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, " FROM \"%s\".\"%s\"", state->schema, state->table);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1911:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(buf, " FROM \"%s\"", state->table);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1914:2:  [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(state->main_scan_query, buf);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1920:3:  [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(state->main_scan_query, buf);
data/postgis-3.1.0~alpha3+dfsg/loader/shapefil.h:290:61:  [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.
    SAFile     (*FOpen) ( const char *filename, const char *access);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1180:4:  [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(name, name2);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1254:3:  [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(state->col_names, name);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1269:3:  [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(state->col_names, state->geo_col);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1478:2:  [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(ret, (char *)stringbuffer_getstring(sb));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1518:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ret, (char *)stringbuffer_getstring(sb));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1850:2:  [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(ret, (char *)stringbuffer_getstring(sb));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1938:2:  [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(ret, (char *)stringbuffer_getstring(sb));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:229:13:  [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.
	if ( -1 == vsnprintf (msg, GUIMSG_LINE_MAXLEN, fmt, ap) ) return;
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:263:13:  [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.
	if ( -1 == vsnprintf (pgui_errmsg, GUIMSG_LINE_MAXLEN, fmt, ap) ) return;
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:704:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(geocol_query, sql_form, schema, table);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1472:3:  [4] (format) sprintf:
  Potential format string problem (CWE-134). Make format string constant.
		sprintf(query, sql_form, loader_file_config->table, loader_file_config->schema);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1543:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(progress_shapefile, &loader_file_config->shp_file[i]);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1842:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(output_shapefile, folder_path);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1843:3:  [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(output_shapefile, G_DIR_SEPARATOR_S);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1844:3:  [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(output_shapefile, dumper_table_config->shp_file);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:71:14:  [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 snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:71: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.
#     define snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:74:11:  [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.
#  ifndef snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:75:14:  [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 snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:75: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.
#     define snprintf _snprintf
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2313:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nsp_tbl, "\"%s\".\"%s\"", nsp, tbl);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2323:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nsp_tbl, "\"%s\".\"%s\"", nsp, tbl);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2332:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(nsp_tbl, "\"%s\"", tbl);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:85:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		str += sprintf(str, "%s", lwtype_name(type));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:90:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (hasz) str += sprintf(str, "%s", "Z");
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:93:19:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	if (hasm) str += sprintf(str, "%s", "M");
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:376:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "%s", lwtype_name(type));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:380:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "%s", "Z");
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:384:10:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		ptr += sprintf(ptr, "%s", "M");
data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c:115:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(query,"SELECT authid FROM \"%s\" WHERE expires >= now() AND toid = '%d' AND rid = '%s'", authtable, trigdata->tg_relation->rd_id, pk_id);
data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c:153:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(query, "SELECT * FROM temp_lock_have_table WHERE xideq( transid, getTransactionID() ) AND lockcode ='%s'", lockcode);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:252:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(id, "//%s:%s[@%s:id='%s']", 	(char *) xnode->ns->prefix,
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_spheroid.c:128:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(result,"SPHEROID(\"%s\",%.15g,%.15g)",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:42:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:52:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:62:2:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	vfprintf(stderr, newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:175:4:  [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(result + (reslen += length), newstr); /* Insert new string */
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:181:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(result + reslen, str); /* Copies last part and ending null char */
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:215:2:  [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(tmp, str);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:229:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(rtn[0], tmp);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:254:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(rtn[*n], token);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:527:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(dst->srs, src->srs);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:831:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "COPY %s%s (%s%s%s) FROM stdin;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:898:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(sql, "%s%s%s",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:942:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(sql, "INSERT INTO %s%s (%s%s%s) VALUES (",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:952:11:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			ptr += sprintf(ptr, "'%s'::raster",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:959:12:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				ptr += sprintf(ptr, ",'%s'", fn);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:987:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "DROP TABLE IF EXISTS %s%s;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1027:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "CREATE TABLE %s%s (\"rid\" serial PRIMARY KEY%s%s,%s raster%s%s%s)%s%s;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1080:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "CREATE INDEX ON %s%s USING gist (st_convexhull(%s))%s%s;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1115:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "ANALYZE %s%s;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1145:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "VACUUM ANALYZE %s%s;",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1203:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "SELECT AddRasterConstraints('%s','%s','%s',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,%s,TRUE,TRUE,TRUE,TRUE,%s);",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1302:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf(sql, "SELECT AddOverviewConstraints('%s','%s','%s','%s','%s','%s',%d);",
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1595:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(info->srs, pszProjectionRef);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2749:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(file, config->rt_file[i]);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2764:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(config->rt_filename[i], ptr);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2783:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(file, config->rt_filename[0]);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2798:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(config->table, file);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2866:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(config->overview_table[i], "o_%d_%s", config->overview[i], config->table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2933:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\".", config->schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2945:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\"", config->table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2957:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\"", config->raster_column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2969:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\"", config->file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2981:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\"", config->tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2993:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(tmp, "\"%s\"", config->idx_tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:3006:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(tmp, "\"%s\"", config->overview_table[i]);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/librtcore.h:233:27:  [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.
  __attribute__ (( format(printf,1,0) ));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:74: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(newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:87: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(newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:100: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(newfmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1966:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(szGDALOption, "DATAPOINTER=%s", pszDataPointer);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1968:5:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
				sprintf(szGDALOption, "DATAPOINTER=0x%s", pszDataPointer);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:686:4:  [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((char*) ptr, band->data.offline.path);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c:335:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(arg->transform.option.item[i], "%s%s", lbl, srs ? srs : "");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:649:4:  [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((char*) ptr, band->data.offline.path);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:171:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(ptr, rt_pixtype_name(pixtype));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_gdal.c:253:6:  [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(options[j], option);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:86:4:  [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(result + (reslen += length), newstr); /* Insert new string */
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:92:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(result + reslen, str); /* Copies last part and ending null char */
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:157:2:  [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(tmp, str);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:171:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(rtn[0], tmp);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:196:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
		strcpy(rtn[*n], token);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3762:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
						sprintf(junk, "%s%s", dash_set[c], dash_set[c + 1]);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3765: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(dash_set[c], junk);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3771:8:  [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(dash_set[dash_it - 1], dash_set[dash_it]);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:84:4:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
			sprintf(rtn, "%s GDAL_DATA not found", ver);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:201:26:  [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.
  __attribute__(( format(printf,1,0) ));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:208:5:  [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.
    vsnprintf (errmsg, RT_MSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:215:26:  [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.
  __attribute__(( format(printf,1,0) ));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:222:5:  [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.
    vsnprintf (msg, RT_MSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:229:26:  [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.
  __attribute__(( format(printf,1,0) ));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:236:5:  [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.
    vsnprintf (msg, RT_MSG_MAXLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:372:4:  [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(gdal_skip, drv_set[i].short_name);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:441:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
		sprintf(boot_postgis_gdal_enabled_drivers, "%s", GDAL_DISABLE_ALL);
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_tester.c:203:3:  [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.
  vsnprintf (cu_error_msg, MAX_CUNIT_MSG_LENGTH, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:95:25:  [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.
__attribute__ (( format(printf, 2, 3) ));
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:105:3:  [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.
  vsnprintf (be->lastErrorMsg, MAXERRLEN, fmt, ap);
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:3910:8:  [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.
  if ( snprintf(values[1], 32, "%" LWTFMT_ELEMID,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic.c:253:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		rndlat = (int)(90.0 - 180.0 * (double)random() / pow(2.0, 31.0));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic.c:254:42:  [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.
		rndlon = (int)(180.0 - 360.0 * (double)random() / pow(2.0, 31.0));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic.c:258:41:  [3] (random) random:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		rndlat = (int)(90.0 - 180.0 * (double)random() / pow(2.0, 31.0));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_geodetic.c:259:42:  [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.
		rndlon = (int)(180.0 - 360.0 * (double)random() / pow(2.0, 31.0));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1226: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("PGCLIENTENCODING") )
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1434:7:  [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("PGCLIENTENCODING") )
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1436:38:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
		char *codepage = encoding2codepage(getenv("PGCLIENTENCODING"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_statistics.c:243:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srand(time(NULL));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_statistics.c:1172:3:  [3] (random) srand:
  This function is not sufficiently random for security-related functions
  such as key and nonce creation (CWE-327). Use a more secure technique for
  acquiring random values.
		srand(time(NULL));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:436: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.
	env_postgis_gdal_enabled_drivers = getenv("POSTGIS_GDAL_ENABLED_DRIVERS");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:458: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.
	env_postgis_enable_outdb_rasters = getenv("POSTGIS_ENABLE_OUTDB_RASTERS");
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h:79: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(result, "NaN", 3);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h:87: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(result + sign, "Infinity", 8);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h:90: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(result, "0", 1);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h:96: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(&bits, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/common.h:102: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(&bits, &d, sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:490: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(result + olength - i - 2, DIGIT_TABLE + c0, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:491: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(result + olength - i - 4, DIGIT_TABLE + c1, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:492: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(result + olength - i - 6, DIGIT_TABLE + d0, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:493: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(result + olength - i - 8, DIGIT_TABLE + d1, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:508: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(result + olength - i - 2, DIGIT_TABLE + c0, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:509: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(result + olength - i - 4, DIGIT_TABLE + c1, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:521: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(result + olength - i - 2, DIGIT_TABLE + c, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:527: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(result + olength - i - 2, DIGIT_TABLE + c, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:795: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(result + index, DIGIT_TABLE + 2 * (exp / 10), 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/d2s.c:799: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(result + index, DIGIT_TABLE + 2 * exp, 2);
data/postgis-3.1.0~alpha3+dfsg/deps/ryu/digit_table.h:22:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char DIGIT_TABLE[200] = {
data/postgis-3.1.0~alpha3+dfsg/deps/wagyu/lwgeom_wagyu.cpp:281: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 str[50] = {0};
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:71: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:72: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:103: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:104: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 y1[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:105: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 y2[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:120: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.
	ptr += sprintf(ptr, "'\" ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:143: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.
	ptr += sprintf(ptr, "-draw \"stroke-linecap round stroke-linejoin round path 'M ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c: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.
	ptr += sprintf(ptr, "'\" ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:169: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.
	ptr += sprintf(ptr, "-draw \"path '");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:172: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.
		ptr += sprintf(ptr, "M ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:176: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.
	ptr += sprintf(ptr, "'\" ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:250: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 str[512];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:251:2:  [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(
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:333: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 [2048];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:347: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 ( (pfile = fopen(argv[1], "r")) == NULL)
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:364: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 output[32768];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:391: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.
		ptr += sprintf( ptr, "-flip tmp%d.png", layerCount );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:25: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 [128];
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:31: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).
	if ((pFile = fopen("styles.conf", "r")) == NULL)
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:67:19:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
						pointSize = atoi(ptr);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:74: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).
						lineWidth = atoi(ptr);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:85: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).
						polygonStrokeWidth = atoi(ptr);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/err_param.c:94:4:  [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 err_out_buf[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:85:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *__record_start_tag__[ ] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:88:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *__landmark_record_start_tag__[ ] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:91:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *__record_end_tag__[ ] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:94:14:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
static const char *__landmark_record_end_tag__[ ] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:219:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
		char __line_buf__[STREAM_BUF_SIZE] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:233:32:  [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.
						__source_start_tag__ = ( char *) __land_field_start_tag__[0][opt] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:236:49:  [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.
                       __source_start_tag__ = ( char *) __land_field_start_tag__[1][opt] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:239:32:  [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.
						__source_start_tag__ = ( char *) __land_field_start_tag__[2][opt] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:242:32:  [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.
						__source_start_tag__ = ( char * ) __field_start_tag__[loc][opt] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:247:30:  [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.
					__source_start_tag__ = (char *) __field_start_tag__[loc][opt] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:260:30:  [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.
						__source_end_tag__ = ( char *) __land_field_tag_end__[ 0 ][ opt ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:263:30:  [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.
						__source_end_tag__ = ( char *) __land_field_tag_end__[ 1 ][ opt ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:266:30:  [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.
						__source_end_tag__ = ( char *) __land_field_tag_end__[ 2 ][ opt ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:269:30:  [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.
						__source_end_tag__ = ( char * ) __field_tag_end__[ loc ][ opt ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:274:29:  [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.
					__source_end_tag__ = ( char * ) __field_tag_end__[ loc ][ opt ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:419:3:  [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( __dest_buf__ , "# " ) ; /* -- reconsider this -- */
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:424:3:  [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( __dest_buf__, "BOX " ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/hash.c:126:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *keys[2];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/hash.c:148:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  const char *keys[2];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c:159:4:  [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 record_buffer[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c:160:4:  [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 lookup_str[ MAXTEXT ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c:161:4:  [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 num_str[ MAXTEXT ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c:164:4:  [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 standard_str[ MAXTEXT ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:242: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 content_buf[MAXSTRLEN] ; /* -- storage for message -- */
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:362: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 Text[MAXTEXT] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:416: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 Text[MAXTEXT] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:495: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 data[BETA_BUF_SIZE] ; /* -- data for display to user - added in
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:509: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 cur_cand_data_A[BETA_BUF_SIZE] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:510: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 cur_cand_data_B[BETA_BUF_SIZE] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:619: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 *idx_nam[ MAX_INDICES ] ; /* pointers to allocated index names */
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:731: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 transfer_buf[MAX_TRANSFER_BUF_SIZE] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:779: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 __field_primary__[4][MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:780: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 __field_secondary__[4][MAXSTRLEN];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:781: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 __field_alternate_primary__[4][MAXSTRLEN];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:782: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 __field_alternate_secondary__[4][MAXSTRLEN];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:783: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 __unstandard_left__[MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:784: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 __unstandard_right__[MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:785: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 __unstandard_alt_left__[MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:786: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 __unstandard_alt_right__[MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:788: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.
	const char __dummies__[4][6] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1131:20:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
   if ( ( HANDLE = fopen( FNAME , \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c:281:4:  [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 combine_buf[ 2 ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c:317: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 upper_buf1[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c:318: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 upper_buf2[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:165: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(ret->cc, "US");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:171:21:  [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.
        ret->zip = (char *) palloc0((ovect[3]-ovect[2]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:174:29:  [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.
            ret->zipplus = (char *) palloc0((ovect[5]-ovect[4]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:185:25:  [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.
            ret->zip = (char *) palloc0((ovect[1]-ovect[0]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:187: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(ret->cc, "CA");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:204:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        state = (char *) palloc0((ovect[1]-ovect[0]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:234: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(ret->cc, "CA");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:306:25:  [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.
            rc = match((char *)t_regx[i], s, ovect, 0);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:315:22:  [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.
        ret->city = (char *) palloc0((ovect[3]-ovect[2]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:346:25:  [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.
            ret->num = (char *) palloc0((ovect[1]-ovect[0]+1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-regex.h:2:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *t_regx[9] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-stcities.h:3:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *states[NUM_STATES] =
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-stcities.h:6:18:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static const char *stcities[NUM_STATES] = {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:146: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 __scan_buf__[MAXSTRLEN] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:639: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(sql, "select seq, word, stdword, token from ");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:641:5:  [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(sql, " order by id ");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:762: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(sql, "select rule from ");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:764:5:  [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(sql, " order by id ");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:69: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 num_str[512];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:131:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buf[1024];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:134: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 input_str[ 4096 ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:135:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char word[512];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:136: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 stdword[512];
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:164:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(flex, "rb");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:193:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(fgaz, "rb");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:225:10:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    in = fopen(frules, "rb");
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:279:4:  [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 unstandard_mic[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/test_main.c:280:4:  [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 unstandard_mac_left[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:296:4:  [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 LTarget[ MAXSTRLEN ] ;
data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c:29: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 query[1024];
data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c:37: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 errmsg[ERRMSGLEN];
data/postgis-3.1.0~alpha3+dfsg/extras/WFS_locks/WFS_locks.c:123:2:  [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(query,"SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table'");
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:77:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&numb_sub, wkb+5,4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:148:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&type, wkb+1,4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:167:4:  [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(&x, &wkb[5], 8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:168:4:  [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(&y, &wkb[5+8], 8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:169:4:  [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(&z, &wkb[5+16], 8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:180:4:  [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(&x, &wkb[5], 8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:181:4:  [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(&y, &wkb[5+8], 8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:200: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(&n1, &wkb[5],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c: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(&x, &wkb[9+t*24],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c: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(&y, &wkb[9+t*24+8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:219: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(&z, &wkb[9+t*24+16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:230: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(&x, &wkb[9+t*16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:231: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(&y, &wkb[9+t*16+8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:253: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(&n1, &wkb[5],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:262:4:  [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(&n2, &wkb[offset],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:291:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&x, &wkb[offset + 4+ v*24],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:292:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&y, &wkb[offset + 4+ v*24 + 8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:293:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&z, &wkb[offset + 4+ v*24 + 16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:305:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&x, &wkb[offset +4 +v*16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:306:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&y, &wkb[offset +4 +v*16 + 8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:337: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(&n1,&wkb[5],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:358: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(&x, &wkb[9+t*29+5],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:359: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(&y, &wkb[9+t*29+8+5],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:360: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(&z, &wkb[9+t*29+16+5],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:371: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(&x, &wkb[9+t*21+5],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:372: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(&y, &wkb[9+t*21+8+5],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:388: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(&n2,&wkb[5],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:406:4:  [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(&n1, &wkb[5 +offset],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:424:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&x, &wkb[offset+9+t*24],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:425:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&y, &wkb[offset+9+t*24+8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:426:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&z, &wkb[offset+9+t*24+16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:437:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&x, &wkb[offset+9+t*16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:438:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(&y, &wkb[offset+9+t*16+8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:467: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(&n3,&wkb[5],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:487:4:  [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(&n1,&wkb[offset1+5],4); //# rings
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:505: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(&n2, &wkb[offset],4);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:523:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(&x, &wkb[offset + 4+ v*24],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:524:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(&y, &wkb[offset + 4+ v*24 + 8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:525:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(&z, &wkb[offset + 4+ v*24 + 16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:536:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(&x, &wkb[offset +4 +v*16],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/printwkb.c:537:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(&y, &wkb[offset +4 +v*16 + 8],8);
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c:71:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	return ( atoi(num) );
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c:91: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		conn_string[255];
data/postgis-3.1.0~alpha3+dfsg/extras/wkb_reader/readwkb.c:100: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		query_str[1000];
data/postgis-3.1.0~alpha3+dfsg/fuzzers/fuzzingengine.c:47: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(argv[1], "rb");
data/postgis-3.1.0~alpha3+dfsg/fuzzers/geojson_import_fuzzer.cpp:68:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(psz, buf, len);
data/postgis-3.1.0~alpha3+dfsg/fuzzers/wkt_import_fuzzer.cpp:116: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(pszWKT, buf, len);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:90:4:  [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(s->buf_start, s->buf_static, s->capacity);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:109:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(v->data, s->buf_start, bufsz);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:145:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(write_to->writecursor, write_from->buf_start, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:190:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(buf, s->buf_start, bufsz);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:273:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->writecursor, start, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:310:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf->writecursor, iptr, WKB_INT_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:356:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf->writecursor, dptr, WKB_DOUBLE_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/bytebuffer.c:408: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(res->buf_start+acc_size, buff_array[i]->buf_start, current_size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_print.c:262:1:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
char result[OUT_DOUBLE_BUFFER_SIZE] = {0};
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_print.c:508: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 s[OUT_DOUBLE_BUFFER_SIZE] = {0}; \
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:19:1:  [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 cu_error_msg[MAX_CUNIT_ERROR_LENGTH + 1] = {0};
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:290:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[MAX_CUNIT_MSG_LENGTH+1];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.c:299:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[MAX_CUNIT_MSG_LENGTH+1];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tree.c:379: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.
	const char *polys[2];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c:48:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(g, gbox, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c:141: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(gout, g2, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c:146: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(gout, g1, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c:429:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(copy, box, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gbox.c:437:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(duplicate, original, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:182:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&type, p, 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:183:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&num, p+4, 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:242:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b2, &srid, sizeof(int));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:244:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b2+sizeof(int), b1, bsz1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:761:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:764:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(point->point->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:770: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(loc, getPoint_internal(point->point, 0), ptsize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:797:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:801:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(line->points->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:810: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(loc, getPoint_internal(line->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:834:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:838:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(poly->nrings), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:844: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(loc, &(poly->rings[i]->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:866:4:  [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(loc, getPoint_internal(pa, 0), pasize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:892:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:896:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(triangle->points->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:905: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(loc, getPoint_internal(triangle->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:931:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:935:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &curve->points->npoints, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:942: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(loc, getPoint_internal(curve->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:963:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:967:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &coll->ngeoms, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1031:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1035:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1039:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1043:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1049: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1053: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1064: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1068: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1076: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1080: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(loc, &f, sizeof(float));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1540: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(g_out, g, 8);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1544:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, g->data, LWSIZE_GET(g->size) - 8);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1591: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(outptr, inptr, 8);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1595: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(outptr, inptr, g_out_size - 8);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized1.c:1602: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(g_out, g, g_out_size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:70: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(&xflags, g->data, sizeof(uint64_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:230:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&type, p, 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:231:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&num, p+4, 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:284:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b2, &srid, sizeof(int));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:286:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(b2+sizeof(int), b1, bsz1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:820:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:823:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(point->point->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:829: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(loc, getPoint_internal(point->point, 0), ptsize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:856:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:860:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(line->points->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:869: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(loc, getPoint_internal(line->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:893:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:897:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(poly->nrings), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:903: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(loc, &(poly->rings[i]->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:925:4:  [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(loc, getPoint_internal(pa, 0), pasize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:951:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:955:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &(triangle->points->npoints), sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:964: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(loc, getPoint_internal(triangle->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:990:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:994:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &curve->points->npoints, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1001: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(loc, getPoint_internal(curve->points, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1022:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &type, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1026:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loc, &coll->ngeoms, sizeof(uint32_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1093:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, &xflags, sizeof(uint64_t));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1595:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr_out, ptr_in, 8); ptr_out += 8; ptr_in += 8;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1599:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr_out, ptr_in, 8); ptr_out += 8; ptr_in += 8;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1603:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr_out, ptr_in, varsize_in - (ptr_in - ptr));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1650: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(outptr, inptr, 8); outptr += 8; inptr += 8;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1654:4:  [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(outptr, inptr, 8); outptr += 8; inptr += 8;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1659: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(outptr, inptr, g_out_size - 8);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/gserialized2.c:1666: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(g_out, g, g_out_size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwboundingcircle.c:203:4:  [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(&next_support, support, sizeof(SUPPORTING_POINTS));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwchaikins.c:54: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(&p2, &p1, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcircstring.c:180:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, getPoint_internal(points[i]->point, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcircstring.c:212:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcollection.c:128:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWCOLLECTION));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwcollection.c:154:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWCOLLECTION));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic.c:198:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d, &(gbox->xmin), 6*sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic.c:225:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d, &(gbox->xmin), 6*sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeodetic.c:276:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(d, &(gbox->xmin), 6*sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom.c:1654:4:  [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(mpt->geoms, out, sizeof(LWPOINT *) * n);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom.c:2520:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&dint, &d, dsz);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom.c:2522:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&d, &dint, dsz);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:42:10:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  static char buf[256];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:153: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(op, ptr, sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:159: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(op, ptr, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:163: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(op, ptr, sizeof(POINT3DZ));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:168: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(op, ptr, sizeof(POINT3DM));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:244: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(op, ptr, sizeof(POINT3DZ));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:253: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(op, ptr, sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:295: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(op, ptr, sizeof(POINT3DM));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:303:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(op, ptr, sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:313: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(&(op->m), ptr, sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:357:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(point, getPoint_internal(pa, n), sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:377:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, p4d, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:380:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, p4d, sizeof(POINT3DZ));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:383:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, p4d, sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:385:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, &(p4d->m), sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_api.c:388:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(ptr, p4d, sizeof(POINT2D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:33: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 tflags[6];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:130: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 tmp[256];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:193:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(result, "Object is of unknown type: %d",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:40:1:  [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 lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:1612: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 tmp[2 * sizeof(int)];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:1703:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(tmp, (char *)cells + j * stride, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:1704:4:  [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((char *)cells + j * stride, (char *)cells + i * stride, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos.c:1705:4:  [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((char *)cells + i * stride, tmp, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_clean.c:295:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWCOLLECTION));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_geos_cluster.c:572: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(components, geoms_in_cluster, j * sizeof(LWGEOM*));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_topo.c:4233:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[256];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_geojson.c:422: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 err[256];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkb.c:293:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&i, s->pos, WKB_INT_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkb.c:321:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&d, s->pos, WKB_DOUBLE_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.c:1237: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/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.c:1669: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/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwline.c:99:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWLINE));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwline.c:114:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWLINE));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwmval.c:75:4:  [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(res_cursor, (double*) pa->serialized_pointlist + i*ndims, pointsize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:113: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.
	ptr += sprintf(ptr, "\"crs\":{\"type\":\"name\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:149: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.
		ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f],",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:153: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.
		ptr += sprintf(ptr, "\"bbox\":[%.*f,%.*f,%.*f,%.*f,%.*f,%.*f],",
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:189: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.
	ptr += sprintf(ptr, "{\"type\":\"Point\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:193: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.
	ptr += sprintf(ptr, "\"coordinates\":");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:195: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.
		ptr += sprintf(ptr, "[]");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:237: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.
	ptr += sprintf(ptr, "{\"type\":\"Polygon\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:242: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.
	ptr += sprintf(ptr, "\"coordinates\":[[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:244: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.
	ptr += sprintf(ptr, "]]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:282: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.
	ptr += sprintf(ptr, "{\"type\":\"LineString\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:285: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.
	ptr += sprintf(ptr, "\"coordinates\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:287: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:336: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.
	ptr += sprintf(ptr, "{\"type\":\"Polygon\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:339: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.
	ptr += sprintf(ptr, "\"coordinates\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:347: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:397: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.
	ptr += sprintf(ptr, "{\"type\":\"MultiPoint\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:400: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.
	ptr += sprintf(ptr, "\"coordinates\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:408: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:459: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.
	ptr += sprintf(ptr, "{\"type\":\"MultiLineString\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:462: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.
	ptr += sprintf(ptr, "\"coordinates\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:473: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:529: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.
	ptr += sprintf(ptr, "{\"type\":\"MultiPolygon\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:532: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.
	ptr += sprintf(ptr, "\"coordinates\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:547: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:598: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.
	ptr += sprintf(ptr, "{\"type\":\"GeometryCollection\",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:601: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.
	ptr += sprintf(ptr, "\"geometries\":[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:610: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.
	ptr += sprintf(ptr, "]}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:129: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:189: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:214:30:  [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.
	if ( IS_DIMS(opts) ) ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:319: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:363: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:416: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:513: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:625: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:682: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:683: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:684: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 z[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:811: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:885: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:975: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.
		ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1046: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1169:12:  [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.
				ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1180:12:  [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.
				ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1291:12:  [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.
				ptr += sprintf(ptr, " srsDimension=\"%d\"", dimension);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1465: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1694: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.
		ptr += sprintf(ptr, "/>");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1901: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1902: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1903: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 z[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:122:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:123: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:169: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.
	ptr += sprintf(ptr, "M ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:215: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.
		ptr += sprintf(ptr, "M ");		/* Start path with SVG MoveTo */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:220:11:  [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.
			ptr += sprintf(ptr, " z");	/* SVG closepath */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:225:11:  [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.
			ptr += sprintf(ptr, " Z");	/* SVG closepath */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:533: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 sx[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:534: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 sy[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:597: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:598: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:613:22:  [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.
		if (i == 1) ptr += sprintf(ptr, " L ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_wkb.c:235:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(buf, iptr, WKB_INT_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_wkb.c:310:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(buf, dptr, WKB_DOUBLE_SIZE);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_wkb.c:418:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(buf, getPoint_internal(pa, 0), size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_x3d.c:514: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 x[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_x3d.c:515: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 y[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_x3d.c:516: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 z[OUT_DOUBLE_BUFFER_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpoint.c:245:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWPOINT));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpoly.c:217:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWPOLY));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwpoly.c:232:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, g, sizeof(LWPOLY));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:84: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 pieces[NUM_PIECES][WORK_SIZE];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:360:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pieces[deg_piece], "%*.*f", deg_digits, deg_dec_digits, degrees);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:370:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pieces[min_piece], "%*.*f", min_digits, min_dec_digits, minutes);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:379:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pieces[sec_piece], "%*.*f", sec_digits, sec_dec_digits, seconds);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c:1023: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(&first, &a1, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c:1046:4:  [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(&a1, &a2, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c:1047:4:  [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(&a2, &a3, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c:1048:4:  [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(&a3,  &b, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwstroke.c:1234:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ret, c, sizeof(LWCOLLECTION));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:119: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 msg[LW_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:128: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 msg[LW_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:144: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 msg[LW_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:462:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
const char dumb_upper_map[128] = "................................................0123456789.......ABCDEFGHIJKLMNOPQRSTUVWXYZ......ABCDEFGHIJKLMNOPQRSTUVWXYZ.....";
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:238:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(getPoint_internal(pa1, pa1->npoints),
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:308: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(pa->serialized_pointlist, ptlist, ptarray_point_size(pa) * npoints);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:527:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((uint8_t *)&pbuf, p, pdims*sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:537: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(getPoint_internal(ret, 0), getPoint_internal(pa, 0), ptsize*where);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:540:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(getPoint_internal(ret, where), (uint8_t *)&pbuf, ptsize);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:544: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(getPoint_internal(ret, where+1),
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:581: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(getPoint_internal(ret, 0), getPoint_internal(pa, 0), ptsize*which);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:587: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(getPoint_internal(ret, which), getPoint_internal(pa, which+1),
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:607:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(         getPoint_internal(pa, 0),
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:611:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(         getPoint_internal(pa, pa1->npoints),
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:647: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(out->serialized_pointlist, in->serialized_pointlist, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1242: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(&p1, &p2, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1422: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(&x, getPoint_internal(pa, i), sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1425: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(getPoint_internal(pa, i), &x, sizeof(double));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1508: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(p_to, pt, pt_size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1614: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(pa->serialized_pointlist + pt_size * kept_it,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1623: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(pa->serialized_pointlist + pt_size * kept_it,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1691: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(pa->serialized_pointlist + pt_size * kept_it,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/ptarray.c:1701: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(pa->serialized_pointlist + pt_size * kept_it,
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.c:128:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(str, s->str_start, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.c:140:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(output->data, s->str_start, size);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.h:95:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(s->str_end, a, alen0);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/gserialized_gist.c:35: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 tmp[8 + 8 * (OUT_MAX_BYTES_DOUBLE + 1)] = {'G', 'I', 'D', 'X', '(', 0};
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:47: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 data[1];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:310: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 query[512];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:365:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(srscopy, srs, size);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:414: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 query[512];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:471:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	srid = atoi(SPI_getvalue(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1));
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:503: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(arg->srs, srs, size);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:245: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 errmsg[PGC_ERRMSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:256: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 errmsg[PGC_ERRMSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:267: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 errmsg[PGC_ERRMSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_pg.c:278: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 errmsg[PGC_ERRMSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:125: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 proj_spi_buffer[spibufferlen];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:166:4:  [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[maxprojlen];
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/shared_gserialized.c:60: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(sg->geom, ref->geom, VARSIZE(ref->geom));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:130: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	abyHeader[XBASE_FILEHDR_SZ] = { 0 };
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:215: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:228: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:272: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:282: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:307: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		abyFileHeader[XBASE_FILEHDR_SZ];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:419: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(pszFullname, pszFilename, nLenWithoutExtension);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:420: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(pszFullname + nLenWithoutExtension, ".dbf", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:424: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( &(psDBF->sHooks), psHooks, sizeof(SAHooks) );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:428: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(pszFullname + nLenWithoutExtension, ".DBF", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:432: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(pszFullname + nLenWithoutExtension, ".cpg", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:436: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(pszFullname + nLenWithoutExtension, ".CPG", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:504: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( psDBF->pszCodePage, pabyBuf, n + 1 );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:695: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(pszFullname, pszFilename, nLenWithoutExtension);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:696: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(pszFullname + nLenWithoutExtension, ".dbf", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:718: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(pszFullname + nLenWithoutExtension, ".cpg", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:723:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
            ldid = atoi( pszCodePage + 5 );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:746: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( &(psDBF->sHooks), psHooks, sizeof(SAHooks) );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:852: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:872: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 szMessage[128];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1048: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( psDBF->pszWorkField,
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1060:39:  [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).
        psDBF->fieldValue.nIntField = atoi(psDBF->pszWorkField);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1322: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	szSField[XBASE_FLD_MAX_WIDTH+1], szFormat[20];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1396: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(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1615: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 ( pabyRec, pRawTuple,  psDBF->nRecordLength );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1664: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 ( newDBF->pszHeader, psDBF->pszHeader, XBASE_FLDHDR_SZ * psDBF->nFields );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1668:4:  [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 ( newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1670:4:  [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 ( newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1672:4:  [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 ( newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1674:4:  [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 ( newDBF->pachFieldType, psDBF->pachFieldType, sizeof(char)*psDBF->nFields );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1722: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[XBASE_FLDNAME_LEN_READ+1];
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1982: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(pszHeaderNew + i * XBASE_FLDHDR_SZ,
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:2019:17:  [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(pszRecordNew + panFieldOffsetNew[i],
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:2165: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(pszOldField, pszRecord + nOffset, nOldWidth);
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:2232: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(pszOldField, pszRecord + nOffset, nOldWidth);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:76:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&double_nan, ndr_nan, 8);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:574:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	size = atoi(PQgetvalue(res, 0, 0));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:657: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 buf[9];
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:826: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( pszFullname, "wb" );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:956:24:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				state->rowcount += atoi(PQgetvalue(res, i, 0));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1012: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).
			state->rowcount += atoi(PQgetvalue(res, i, 0));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1017: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).
			tmpint = atoi(PQgetvalue(res, i, 1));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1114:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		state->rowcount = atoi(PQgetvalue(res, 0, 0));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1197:3:  [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(connstring, " host=");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1203:3:  [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(connstring, " port=");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1209:3:  [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(connstring, " user=");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1215:3:  [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(connstring, " password='");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1222:3:  [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(connstring, " dbname=");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1228:3:  [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(connstring, " client_encoding=UTF8");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1278: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).
	state->pgis_major_version = atoi(tmpvalue);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1295:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		state->geom_oid = atoi(tmpvalue);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1321:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		state->geog_oid = atoi(tmpvalue);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1338:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char buf[256];
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1355:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(state->table, "__pgsql2shp%lu_tmp_table", (long)getpid());
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1476:17:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pgfieldtype = atoi(PQgetvalue(res, i, 1));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1477:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pgtypmod = atoi(PQgetvalue(res, i, 2));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1478:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		pgfieldlen = atoi(PQgetvalue(res, i, 3));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1555: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(dbffieldname, "%.7s_%.2d", ptr, abs(tmpint) % 100);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1853:2:  [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(state->main_scan_query, "DECLARE cur ");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1855:3:  [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(state->main_scan_query, "BINARY ");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1857:2:  [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(state->main_scan_query, "CURSOR FOR SELECT ");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1919:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(buf, " ORDER BY \"gid\"");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1961:2:  [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(state->fetch_query, "FETCH %d FROM cur", state->config->fetchsize);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.h:185: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 message[SHPDUMPERMSGLEN];
data/postgis-3.1.0~alpha3+dfsg/loader/safileio.c:96:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    return (SAFile) fopen( pszFilename, pszAccess );
data/postgis-3.1.0~alpha3+dfsg/loader/safileio.c:225:13:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    nWide = MultiByteToWideChar( CP_UTF8, 0, pszFilename, nMulti, 0, 0);
data/postgis-3.1.0~alpha3+dfsg/loader/safileio.c:235:9:  [2] (buffer) MultiByteToWideChar:
  Requires maximum length in CHARACTERS, not bytes (CWE-120).
    if( MultiByteToWideChar( CP_UTF8, 0, pszFilename, nMulti, pwszFileName, nWide ) == 0 )
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:843:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[MAXFIELDNAMELEN];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:844: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 name2[MAXFIELDNAMELEN];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1259:4:  [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(state->col_names, "\",");
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1549: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 val[MAXVALUELEN];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.h:208: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 message[SHPLOADERMSGLEN];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:208: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 pgui_errmsg[GUIMSG_LINE_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:226: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 msg[GUIMSG_LINE_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:306:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char sql_trunc[256];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:344: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 sql_trunc[256];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:373: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_trunc[256];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:745:12:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		hasgeo = atoi(PQgetvalue(result, i, PQfnumber(result, "hasgeo")));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:906:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loader_file_config, global_loader_config, sizeof(SHPLOADERCONFIG));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:931:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(loader_file_config->table, table_start, table_end - table_start);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:959: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 srid[MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1027:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dumper_table_config, global_dumper_config, sizeof(SHPDUMPERCONFIG));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1423: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 progress_text[GUIMSG_LINE_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1772: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 progress_text[GUIMSG_LINE_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2042: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).
	loader_file_config->sr_id = atoi(srid);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2180: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 srid[MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:216: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 linebuffer[1024];
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:222: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).
  fptr = fopen(filename, "r");
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:314:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
    num = atoi(cpg);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:62:29:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#define ByteCopy( a, b, c )	memcpy( b, a, c )
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:219: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:269: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:372: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( &(psSHP->sHooks), psHooks, sizeof(SAHooks) );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:380: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(pszFullname, pszLayer, nLenWithoutExtension);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:381: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(pszFullname + nLenWithoutExtension, ".shp", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:385: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(pszFullname + nLenWithoutExtension, ".SHP", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:405: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(pszFullname + nLenWithoutExtension, ".shx", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:409: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(pszFullname + nLenWithoutExtension, ".SHX", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:480: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:515: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( &dValue, pabyBuf+36, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:519: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( &dValue, pabyBuf+44, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:523: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( &dValue, pabyBuf+52, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:527: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( &dValue, pabyBuf+60, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:531: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( &dValue, pabyBuf+68, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:535: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( &dValue, pabyBuf+76, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:539: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( &dValue, pabyBuf+84, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:543: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( &dValue, pabyBuf+92, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:567: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:595: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:625: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( &nOffset, pabyBuf + i * 8, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:628: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( &nLength, pabyBuf + i * 8 + 4, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:633: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:645: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:713: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            abyReadedRecord[8];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:750: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(pszFullname, pszLayer, nLenWithoutExtension);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:751: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(pszFullname + nLenWithoutExtension, ".shp", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:755: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(pszFullname + nLenWithoutExtension, ".SHP", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:797: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(pszFullname + nLenWithoutExtension, ".shx", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:822: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( pabySHXHeader, pabyBuf, 100 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c: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( abyReadedRecord, &nRecordOffset, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:833: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( abyReadedRecord + 4, &nRecordLength, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1028: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(pszFullname, pszLayer, nLenWithoutExtension);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1029: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(pszFullname + nLenWithoutExtension, ".shp", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1033: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1042: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(pszFullname + nLenWithoutExtension, ".shx", 5);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1046: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1087: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1106: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1290: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(psObject->padfX, padfX, nSize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1292: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(psObject->padfY, padfY, nSize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1294: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(psObject->padfZ, padfZ, nSize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1297: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(psObject->padfM, padfM, nSize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1441: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( pabyRec + nRecordSize, psObject->panPartType,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1648: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1693: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1707: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 szErrorMsg[200];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1838: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                 szErrorMsg[160];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1859: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1873: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1883: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1932: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1974: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:1996: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( &nSHPContentLength, psSHP->pabyRec + 4, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2002: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2018: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 str[128];
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2037: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( &nSHPType, psSHP->pabyRec + 8, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2091: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( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2092: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( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2093: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( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2094: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( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2105: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( &nPoints, psSHP->pabyRec + 40 + 8, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2106: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( &nParts, psSHP->pabyRec + 36 + 8, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2188: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( psShape->panPartStart, psSHP->pabyRec + 44 + 8, 4 * nParts );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2226: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( psShape->panPartType, psSHP->pabyRec + nOffset, 4*nParts );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2240: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(psShape->padfX + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2244: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(psShape->padfY + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2261: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( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2262: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( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2269:17:  [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( psShape->padfZ + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2289: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( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2290: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( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2297:17:  [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( psShape->padfM + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2331: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( &nPoints, psSHP->pabyRec + 44, 4 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2393: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(psShape->padfX+i, psSHP->pabyRec + 48 + 16 * i, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2394: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(psShape->padfY+i, psSHP->pabyRec + 48 + 16 * i + 8, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2405: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( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2406: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( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2407: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( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2408: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( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2420: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( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2421: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( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2428:17:  [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( psShape->padfZ + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2446: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( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2447: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( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2454:17:  [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( psShape->padfM + i,
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2501: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( psShape->padfX, psSHP->pabyRec + 12, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2502: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( psShape->padfY, psSHP->pabyRec + 20, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2514: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( psShape->padfZ, psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:2529: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( psShape->padfM, psSHP->pabyRec + nOffset, 8 );
data/postgis-3.1.0~alpha3+dfsg/postgis/brin_nd.c:65: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 gboxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/geography_inout.c:260: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(prefix_buf, VARDATA_ANY(prefix_text),
data/postgis-3.1.0~alpha3+dfsg/postgis/geography_inout.c:275: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(id_buf, VARDATA(id_text), VARSIZE_ANY_EXHDR(id_text));
data/postgis-3.1.0~alpha3+dfsg/postgis/geography_inout.c:346: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(prefixbuf, VARDATA(prefix_text),
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:917: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(nd_stats, floatptr, sizeof(float) * nvalues);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:934: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(nd_stats, sslot.numbers, sizeof(float4) * sslot.nnumbers);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_2d.c:121: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 tmp[13 + 4 * OUT_MAX_BYTES_DOUBLE] = {'B', 'O', 'X', '2', 'D', 'F', '(', 0};
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_2d.c:144:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((void*)c, (void*)b, sizeof(BOX2DF));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_2d.c:529: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(box2df, f, sizeof(BOX2DF));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_2d.c:1734: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(intervalsUpper, intervalsLower,
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:115:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy((void *)c, (void *)b, VARSIZE(b));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:509: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 boxmem1[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:510: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 boxmem2[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:531: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 boxmem2[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:550: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 boxmem2[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:916: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 gidxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:1087: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 gidxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:1271: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 query_box_mem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_gist_nd.c:1331: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 query_box_mem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_2d.c:187:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(next_rect_box, rect_box, sizeof(RectBox));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_3d.c:229:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(next_cube_box, cube_box, sizeof(CubeBox3D));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c:195:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(left, cube_box->left, VARSIZE(cube_box->left));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c:196:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(right, cube_box->right, VARSIZE(cube_box->right));
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c:404: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 gidxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c:534: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 gidxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_spgist_nd.c:599: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 gidxmem[GIDX_MAX_SIZE];
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:87: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.
		str += sprintf(str, "Geometry");
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:96:19:  [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.
	if (srid) str += sprintf(str, ",%d", srid);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:374: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.
		ptr += sprintf(ptr, "Geometry");
data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c:57: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 query[1024];
data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c:65: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 err_msg[ERRMSGLEN];
data/postgis-3.1.0~alpha3+dfsg/postgis/long_xact.c:144:2:  [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(query,"SELECT * FROM pg_class WHERE relname = 'temp_lock_have_table'");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:97: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 tmp[500] = {'B', 'O', 'X', '(', 0}; /* big enough */
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:105:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(&box_aligned, box, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:120:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result, tmp, size + 1);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:391:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result, box, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:437: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(result, &box, sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:444: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(result, (char *)PG_GETARG_DATUM(box2d_idx), sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box.c:453: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(result, (char *)PG_GETARG_DATUM(box2d_idx), sizeof(GBOX));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.c:131:3:  [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(result, "NULL");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.c:371:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result, box, sizeof(BOX3D));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.c:483: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(result, box, sizeof(BOX3D));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_box3d.c:504: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(result, box, sizeof(BOX3D));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:83: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 address[256];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:86: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 *values[2];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:171: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.
					ptr += sprintf(ptr, "%d", state->stack[i]->idx+1);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:229: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 address[256];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:230: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 *values[2];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:301:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(address, "{%d}", state->ringnum);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_export.c:126:4:  [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(prefix_buf, VARDATA(prefix_text), len);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_export.c:146:4:  [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(gml_id_buf, VARDATA(gml_id_text), len);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_export.c:366:4:  [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(defidbuf, VARDATA(defid_text),
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_basic.c:206: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 ver[32];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_basic.c:227: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 ver[64];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_lrs.c:380:4:  [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(p1, p2, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_lrs.c:411:4:  [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(p2, p1, sizeof(POINT4D));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c:1153:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				quadsegs = atoi(val);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c:1387:16:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				quadsegs = atoi(val);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c:1653: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 *values[3]; /* valid bool, reason text, location geometry */
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c:1724:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(result, tuple->t_data, tuple->t_len);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_geojson.c:46:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(VARDATA(result), cstring, len);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_geojson.c:56:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(str, VARDATA(textptr), size);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:348: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 text_in[16];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:349: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 text_out[16];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:394: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 query[256];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:401:2:  [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(query, "SELECT position('+units=m ' in proj4text) \
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:415:14:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
	is_planar = atoi(result);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:491:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		srs->srid = atoi(++p);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:772:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
        dim = atoi((char *) dimension);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:837:9:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
		dim = atoi((char *) dimension);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:1130: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(getPoint_internal(pa, 0), getPoint_internal(ppa[0], 0), cp_point_size * (ppa[0]->npoints));
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_gml.c:1143:4:  [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(getPoint_internal(pa, npoints),
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_inout.c:125:11:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			srid = atoi(tmp);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:132:3:  [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(result,"POINT");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:134:3:  [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(result,"MULTIPOINT");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:136:3:  [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(result,"LINESTRING");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:138:3:  [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(result,"CIRCULARSTRING");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:140:3:  [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(result, "COMPOUNDCURVE");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:142:3:  [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(result,"MULTILINESTRING");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:144:3:  [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(result, "MULTICURVE");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:146:3:  [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(result,"POLYGON");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:148:3:  [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(result,"TRIANGLE");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:150:3:  [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(result,"CURVEPOLYGON");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:152:3:  [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(result,"MULTIPOLYGON");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:154:3:  [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(result, "MULTISURFACE");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:156:3:  [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(result,"GEOMETRYCOLLECTION");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:158:3:  [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(result,"POLYHEDRALSURFACE");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:160:3:  [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(result,"TIN");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:162:3:  [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(result,"UNKNOWN");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c:403: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[MAXDATELEN + 1];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c:411: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[MAXDATELEN + 1];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c:419: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[MAXDATELEN + 1];
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_transform.c:200: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(prefixbuf, VARDATA(prefix_text),
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_window.c:252: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(context->result, r, sizeof(int) * N);
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:535: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, v.val.string.val, v.val.string.len);
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:547:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(value, v.val.string.val, v.val.string.len);
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:1389: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(&layer->keys[key_offset], layer2->keys, sizeof(char *) * layer2->n_keys);
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:1402: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(
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:1416: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(&layer->features[feature_offset], layer2->features, sizeof(char *) * layer2->n_features);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:39: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 newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:49: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 newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:59:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:529:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst->dim, src->dim, sizeof(uint32_t) * 2);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:537:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst->nband, src->nband, sizeof(int) * src->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:545:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst->gdalbandtype, src->gdalbandtype, sizeof(GDALDataType) * src->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:553:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst->bandtype, src->bandtype, sizeof(rt_pixtype) * src->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:561:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst->hasnodata, src->hasnodata, sizeof(int) * src->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:569:3:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
		memcpy(dst->nodataval, src->nodataval, sizeof(double) * src->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:571:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst->gt, src->gt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:572:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(dst->tile_size, src->tile_size, sizeof(int) * 2);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:950:12:  [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.
				ptr += sprintf(ptr, "ST_Transform(");
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:956:12:  [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.
				ptr += sprintf(ptr, ", %d)", out_srid);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:961:11:  [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.
			ptr += sprintf(ptr, ");");
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1359:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(gtOv, info->gt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1431:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(gt, gtOv, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1607: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).
					info->srid = atoi(pszAuthorityCode);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1630:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(gt, info->gt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1642: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(info->nband, config->nband, sizeof(int) * info->nband_count);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2311:20:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				config->srid = atoi(optarg);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2336: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).
					if (!array_range(atoi(minmax[0]), atoi(minmax[1]), 1, &range, &p)) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2336: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).
					if (!array_range(atoi(minmax[0]), atoi(minmax[1]), 1, &range, &p)) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2364:15:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
					*range = atoi(t);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2424:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
					config->tile_size[j] = atoi(t);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2510:27:  [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).
				config->overview[j] = atoi(t);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2583:21:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			config->endian = atoi(argv[++argit]);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2588: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).
			config->version = atoi(argv[++argit]);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2810:3:  [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(config->raster_column, "rast");
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2821:3:  [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(config->file_column_name, "filename");
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2849: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 factor[4];
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2858:4:  [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(factor, "%d", config->overview[i]);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:172:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(band->data.offline.path, path, pathlen);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:309: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(data, band->data.mem, rt_pixtype_size(band->pixtype) * band->width * band->height);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:902:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:908:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:914:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:920:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:926:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:932:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:938:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, vals, size * len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:1200:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(_vals, ptr, _nvals * pixsize);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:70:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:83: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 newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_context.c:96: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 newfmt[1024] = {0};
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_geometry.c:1132:3:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
		sprintf(pszQuery, "PixelValue != %f", dBandNoData );
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_mapalgebra.c:1018:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(rtnrast, _param->raster[i], sizeof(struct rt_raster_t));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_mapalgebra.c:1121:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(rtnrast, customextent, sizeof(struct rt_raster_t));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_mapalgebra.c:1125:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(rtnrast, _param->raster[i], sizeof(struct rt_raster_t));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:688: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(_gt, gt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:767: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(_gt, gt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:817: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(_igt, igt, sizeof(double) * 6);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1762: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(rtn[output_driver].short_name, txt, txt_len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1769: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(rtn[output_driver].long_name, txt, txt_len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1776: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(rtn[output_driver].create_options, txt, txt_len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1824: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 szGDALOption[50];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1825: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 *apszOptions[4];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1961:4:  [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(pszDataPointer, "%p", pVoid);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:2238:29:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
			rt_raster_set_srid(rast, atoi(authcode));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:555:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ptr, raster, sizeof (struct rt_raster_serialized_t));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:634:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:640:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:646:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:652:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:658:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:663:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &band->nodataval, 8);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:692:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, band->data.mem, datasize);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:756:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rast, serialized, sizeof (struct rt_raster_serialized_t));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:891:4:  [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(band->data.offline.path, ptr, pathlen);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c:873:2:  [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(arg->wopts->papszWarpOptions[0], "INIT_DEST=NO_DATA");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:181:4:  [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(band->data.offline.path, *ptr, sz);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:214:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(band->data.mem, *ptr, sz);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:535:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(ptr, &(raster->numBands), sizeof (struct rt_raster_serialized_t) - 6);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:597:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:603:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:609:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:615:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:621:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &v, 4);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:626:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
				memcpy(ptr, &band->nodataval, 8);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:657:4:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
			memcpy(ptr, rt_band_get_data(band), datasize);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_create.c:770:32:  [2] (integer) atoi:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
				rt_raster_set_srid(raster, atoi(authcode));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_gdal.c:324:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(VARDATA(result), gdal, VARSIZE_ANY_EXHDR(result));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_geometry.c:1216:3:  [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(options[options_len - 1], "ALL_TOUCHED=TRUE");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_inout.c:145:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(VARDATA(result), wkb, VARSIZE_ANY_EXHDR(result));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:134:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(rtn, input, strlen(input) - offset);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:95: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 fcinfo_data[SizeForFunctionCallInfo(FUNC_MAX_ARGS)]; /* Could be optimized */
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1200: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 nulls[12];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1494: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 place[12] = "$1";
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1514: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(place, "$%d", k);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1529: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(sql, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1530: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(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1531: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(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4363:7:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
						memcpy(tmp, _element, percent - _element);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4504: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 place[12];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4701: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(initexpr, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4702: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(initexpr + strlen("SELECT ("), expression, strlen(expression));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4703: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(initexpr + strlen("SELECT (") + strlen(expression), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4928: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(place,"$1");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4938: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(place, "$%d", j);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6028: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((void *)VARDATA(txtCallbackParam), (void *)VARDATA(txtNodataMode), VARSIZE(txtNodataMode) - VARHDRSZ);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6272: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 nulls[ARGKWCOUNT];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6792:6:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
					char place[5] = "$1";
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6807:8:  [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(place, "$%d", k);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6832:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(sql, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6833:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6834:6:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
					memcpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:50: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 ver[64];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:67:5:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
    memcpy(VARDATA(result), ver, strlen(ver));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_wkb.c:84:2:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
	memcpy(VARDATA(result), wkb, VARSIZE_ANY_EXHDR(result));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:206: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 errmsg[RT_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c: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 msg[RT_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:234: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 msg[RT_MSG_MAXLEN+1];
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_tester.c:17:1:  [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 cu_error_msg[MAX_CUNIT_MSG_LENGTH + 1] = {0};
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:64: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 lastErrorMsg[MAXERRLEN];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:3814:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:3815: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 *values[2];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:3933:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4009:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4073:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4137:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char buf[64];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4677:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char buf[32];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4775:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[32];
data/postgis-3.1.0~alpha3+dfsg/topology/postgis_topology.c:4906:9:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
        char buf[32];
data/postgis-3.1.0~alpha3+dfsg/deps/uthash/include/uthash.h:92: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).
#define uthash_strlen(s) strlen(s)
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:84:19:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if ( i ) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:174:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:269: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).
	str = malloc( (18 + (2*strlen(filename)) + 1) * sizeof(char) );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:282: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).
	char *str = malloc( (48 + strlen(filename) + 1) * sizeof(char) );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:310:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
		strncpy(*styleName, "Default", 7);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:317:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(*styleName, line, ptr - line);
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:341: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 ( argc != 2 || strlen(argv[1]) < 3)
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:353: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).
	filename = malloc( strlen(argv[1]) + strlen(image_path) + 1 );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:353: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).
	filename = malloc( strlen(argv[1]) + strlen(image_path) + 1 );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:355:2:  [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( filename, argv[1], strlen(argv[1])-3 );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:355: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).
	strncat( filename, argv[1], strlen(argv[1])-3 );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:356:2:  [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. Risk is low because the source is a
  constant string.
	strncat( filename, "png", 3 );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/generator.c:381: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).
			lwgeom = lwgeom_from_wkt( line+strlen(styleName)+1, LW_PARSER_CHECK_NONE );
data/postgis-3.1.0~alpha3+dfsg/doc/html/image_src/styles.c:187:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(result, start, len);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:210: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).
    if (paddr->city) k += strlen(paddr->city) + 1;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:211: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).
    if (paddr->st)   k += strlen(paddr->st)   + 1;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c: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).
    if (paddr->zip)  k += strlen(paddr->zip)  + 1;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:213: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).
    if (paddr->cc)   k += strlen(paddr->cc)   + 1;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:220:52:  [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.
    if (paddr->city) { strcat(macro, paddr->city); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:221:52:  [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.
    if (paddr->st  ) { strcat(macro, paddr->st  ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:222:52:  [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.
    if (paddr->zip ) { strcat(macro, paddr->zip ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/address_standardizer.c:223:52:  [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.
    if (paddr->cc  ) { strcat(macro, paddr->cc  ); strcat(macro, ","); }
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/err_param.c:219: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( err_p -> error_buf ) > MAXSTRLEN ) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:402:8:  [1] (buffer) strlen:
  Does not handle 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( __stan_str__ ) + strlen( __dest_buf__ )) > MAXFLDLEN )
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/export.c:402: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).
	if (( strlen( __stan_str__ ) + strlen( __dest_buf__ )) > MAXFLDLEN )
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/lexicon.c:176: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).
      if (strspn(record_buffer, " \t\r\n") == strlen(record_buffer))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_api.h:1078: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).
   DEST = (char * ) malloc( sizeof( char ) * ( strlen( SRC ) + 1 ) ) ; \
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c:205: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).
   for ( i = strlen( buf ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/pagc_tools.c:429: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).
   pn_len = strlen( path_name ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:46: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).
    if (!st || strlen(st) != 2) return NULL;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:63:7:  [1] (buffer) strlen:
  Does not handle 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(s)-1;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:75: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).
    for (i=0; i<strlen(s); i++)
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:86: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).
    for (i=0; i<strlen(s); i++)
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:100: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).
    rc = pcre_exec(re, NULL, s, strlen(s), 0, 0, ovect, OVECCOUNT);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:148: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 (ui=0, uj=0; ui<strlen(s); ui++) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:172:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ret->zip, s+ovect[2], ovect[3]-ovect[2]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:175:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ret->zipplus, s+ovect[4], ovect[5]-ovect[4]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:186:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ret->zip, s+ovect[0], ovect[1]-ovect[0]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:205:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(state, s+ovect[0], ovect[1]-ovect[0]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:293: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).
    if (rc <= 0 && ret->st && strlen(ret->st)) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:316:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy(ret->city, s+ovect[2], ovect[3]-ovect[2]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/parseaddress-api.c:347:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
            strncpy(ret->num, s, ovect[1]-ovect[0]);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:46:6:  [1] (buffer) strlen:
  Does not handle 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(__scan_buf__)
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:495: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(stand_address -> standard_fields[0]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:497: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(stand_address -> standard_fields[1]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:499: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(stand_address -> standard_fields[2]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c: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(stand_address -> standard_fields[3]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:503: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(stand_address -> standard_fields[4]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:505: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(stand_address -> standard_fields[5]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:507: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(stand_address -> standard_fields[6]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:509: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(stand_address -> standard_fields[7]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:511: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(stand_address -> standard_fields[8]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:513: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(stand_address -> standard_fields[9]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:515: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(stand_address -> standard_fields[10]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:517: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(stand_address -> standard_fields[11]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:519: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(stand_address -> standard_fields[12]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:521: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(stand_address -> standard_fields[13]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:523: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(stand_address -> standard_fields[14]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/standard.c:525: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(stand_address -> standard_fields[15]))
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:630: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).
    if (!tab || !strlen(tab)) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:638: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).
    sql = SPI_palloc(strlen(tab)+65);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:753: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).
    if (!tab || !strlen(tab)) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/std_pg_hash.c:761: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).
    sql = SPI_palloc(strlen(tab)+35);
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:411: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).
   if ( ( strlen( LT ) == 1 ) &&
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:439: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).
   if ( ( strlen( LT ) != 2 ) ||
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:444: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).
   prev_len = strlen( prev_lex_p -> Text ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:503: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).
   tl = strlen( cur_txt ) ;
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:548: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).
      if ( strlen( cur_txt ) != 2 ) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:581: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( cur_txt ) != 1 ) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:602: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( cur_txt ) != 1 ) {
data/postgis-3.1.0~alpha3+dfsg/extensions/address_standardizer/tokenize.c:848: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).
      BLANK_STRING((LTarget + strlen(LTarget) - 2)) ;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_print.c:28: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).
	if (0 != strlen(cu_error_msg))
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_print.c:50: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).
	if (0 == strlen(cu_error_msg))
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:24: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:32: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:83: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:92: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:119: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:128: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:137: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:188: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:197: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:207: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:218: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:245: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:257: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:275: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:311: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:323: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:336: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:351: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_surface.c:378: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).
	CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.h:51: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).
		msg = lwalloc(60 + (obtained ? strlen(obtained) : 4) + (expected ? strlen(expected) : 4));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/cunit/cu_tester.h:51:70:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		msg = lwalloc(60 + (obtained ? strlen(obtained) : 4) + (expected ? strlen(expected) : 4));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwalgorithm.c:725:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t hashlen = strlen(geohash);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwgeom_debug.c:112: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).
		size += strlen(tmp)+1;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_encoded_polyline.c:38: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).
  int length = strlen(encodedpolyline);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_geojson.c:447: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).
						*srs = lwalloc(strlen(pszName) + 1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkb.c:870: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).
	hexwkb_len = strlen(hexwkb);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt.c:84: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).
	for( i = 0; i < strlen(dimensionality); i++ )
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_lex.c:1004:14:  [1] (buffer) getc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_lex.c:2038: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).
	return yy_scan_bytes( yystr, (int) strlen(yystr) );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwin_wkt_parse.c:1134: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/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:103:10:  [1] (buffer) strlen:
  Does not handle 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 += strlen(srs) * sizeof(char);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:197:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, "}");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:342:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:343:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:345:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "]");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:404:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:466:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:467:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:470:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "]");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:535:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:536:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:540:18:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			if (j) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:541:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			ptr += sprintf(ptr, "[");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:543:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			ptr += sprintf(ptr, "]");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:545:10:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		ptr += sprintf(ptr, "]");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_geojson.c:605:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:115: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:120: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).
		if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:150: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:175: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:181: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).
		if ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:206: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:215:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:302: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:306: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:322:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:344: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:348: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:366:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:390: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:393: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:419:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:456: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:463: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:516:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:570: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:576: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 ( srs ) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:628:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:698:20:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			if ( i ) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:711:20:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			if ( i ) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:788: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:792:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:793:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:793: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:815:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:839: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:856:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:857:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:857: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:888:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:939: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:942:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:943:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:943: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:968:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:977:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1007: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1013:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1014:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1014: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1049:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1095: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1099:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1100:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1100: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1153:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf( ptr, ">" );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1171:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1182:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1205: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1208:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1209:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1209: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1271:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1293:11:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			ptr += sprintf( ptr, ">" );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1344: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1348:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1349:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(prefix) + strlen(id) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1349: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).
	if (id)  size += strlen(prefix) + strlen(id) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1367:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1408: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1414:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1415:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1415: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1468:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1518: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1521:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1522:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1522: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1581: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1584:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1585:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1585: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1643: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1648:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1649:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1649: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1697:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf(ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1749: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1751:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1752:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1752: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1791:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf( ptr, ">");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1827: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).
	size_t prefixlen = strlen(prefix);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1829:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (srs) size += strlen(srs) + sizeof(" srsName=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1830:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1830: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).
	if (id)  size += strlen(id) + strlen(prefix) + sizeof(" id=..");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1864:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	ptr += sprintf( ptr, ">" );
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1916:20:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			if ( i ) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_gml.c:1933:20:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
			if ( i ) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:214:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, " ");	/* Space beetween each ring */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:273:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ",");  /* Arbitrary comma separator */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:322:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, " ");  /* SVG whitespace Separator */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:371:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, " ");  /* SVG whitespace Separator */
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:427:17:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		if (i) ptr += sprintf(ptr, ";");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwout_svg.c:614:22:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
		else if (i) ptr += sprintf(ptr, " ");
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:114: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).
	int format_length = ((NULL == format) ? 0 : strlen(format));
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:134:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		format_length = strlen(format);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:247: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(pieces[current_piece], &next_char, 1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:297:4:  [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(pieces[current_piece], &(format[index]), multibyte_char_width);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:415: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).
	result = (char*)lwalloc(strlen(lat_text) + strlen(lon_text) + 2);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwprint.c:415: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).
	result = (char*)lwalloc(strlen(lat_text) + strlen(lon_text) + 2);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:250: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).
	size_t l = strlen(a)+1;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:252:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(b, a, l);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:284:4:  [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(output, outstart, endpos - startpos + 1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:292: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. Risk is low because the source is a
  constant string.
				strncat(output, "...", 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:293: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(output, outstart, maxlength - 3);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:298: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. Risk is low because the source is a
  constant string.
				strncat(output, "...", 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:310:4:  [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(output, outstart, endpos - startpos + 1);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:318: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(output, outstart, maxlength - 3);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:319: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. Risk is low because the source is a
  constant string.
				strncat(output, "...", 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:324: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. Risk is low because the source is a
  constant string.
				strncat(output, "...", 4);
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:507: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).
	for (i = 0; i < strlen(str); i++)
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:516: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).
	tmpendpos = strlen(str) - 1;
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/lwutil.c:517: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).
	for (i = strlen(str) - 1; i != 0; i--)
data/postgis-3.1.0~alpha3+dfsg/liblwgeom/stringbuffer.h:105:13:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	int alen = strlen(a); /* Length of string to append */
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:362: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).
	size = strlen(srs) + 1;
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_cache.c:500:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size_t size = strlen(srs) + 1;
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:115: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).
		ostr = SPI_palloc(strlen(str)+1);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:155: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 (proj4text && strlen(proj4text))
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:164:7:  [1] (buffer) strlen:
  Does not handle 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(authname) && strlen(authsrid))
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:164: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).
		    strlen(authname) && strlen(authsrid))
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:173: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 (srtext && strlen(srtext))
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:251:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(strs.proj4text, "+proj=laea +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxprojlen );
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:256:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(strs.proj4text, "+proj=stere +lat_0=-90 +lat_ts=-71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxprojlen);
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:261:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(strs.proj4text, "+proj=laea +lat_0=90 +lon_0=-40 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxprojlen );
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:266:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(strs.proj4text, "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxprojlen );
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:271:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
			strncpy(strs.proj4text, "+proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs", maxprojlen );
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:287: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).
	if ((strs->proj4text && strlen(strs->proj4text)) ||
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:288: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).
		(strs->authtext && strlen(strs->authtext)) ||
data/postgis-3.1.0~alpha3+dfsg/libpgcommon/lwgeom_transform.c:289: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).
		(strs->srtext && strlen(strs->srtext)))
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:368: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).
    int nLen = STATIC_CAST(int, strlen(pszBasename));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:511: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).
        psDBF->pszCodePage = STATIC_CAST(char *, malloc(strlen(REINTERPRET_CAST(char*, pabyBuf)) + 1));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:730:88:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
            psHooks->FWrite( CONST_CAST(void*, STATIC_CAST(const void*, pszCodePage)), strlen(pszCodePage), 1, fpCPG );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:769:58:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        psDBF->pszCodePage = STATIC_CAST(char *, malloc( strlen(pszCodePage) + 1 ));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:925:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( pszFInfo, pszFieldName, XBASE_FLDNAME_LEN_WRITE );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1204: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).
        return strlen(pszValue) == 0;
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1282:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy( pszFieldName, STATIC_CAST(char *,psDBF->pszHeader)+iField*XBASE_FLDHDR_SZ,
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1391: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).
        if( STATIC_CAST(int,strlen(szSField)) > psDBF->panFieldSize[iField] )
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1397: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).
            szSField, strlen(szSField) );
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1408: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).
	if( STATIC_CAST(int, strlen(STATIC_CAST(char *,pValue))) > psDBF->panFieldSize[iField] )
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1417: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).
	    j = STATIC_CAST(int, strlen(STATIC_CAST(char *,pValue)));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1420:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1480: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).
    if( STATIC_CAST(int, strlen(STATIC_CAST(char *, pValue))) > psDBF->panFieldSize[iField] )
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1486: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).
        j = STATIC_CAST(int, strlen(STATIC_CAST(char *, pValue)));
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:1489:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(REINTERPRET_CAST(char *, pabyRec+psDBF->panFieldOffset[iField]),
data/postgis-3.1.0~alpha3+dfsg/loader/dbfopen.c:2111:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy( pszFInfo, pszFieldName, XBASE_FLDNAME_LEN_WRITE );
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:544: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).
		query = (char *)malloc(strlen(fname)+strlen(table)+
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:544: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).
		query = (char *)malloc(strlen(fname)+strlen(table)+
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:545: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).
		                       strlen(schema)+46);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:552: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).
		query = (char *)malloc(strlen(fname)+strlen(table)+46);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:552: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).
		query = (char *)malloc(strlen(fname)+strlen(table)+46);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:728:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		size += 3 * strlen(schema);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:731: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).
	esc_table = (char *) malloc(3 * strlen(table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:732: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).
	esc_geo_col_name = (char *) malloc(3 * strlen(geo_col_name) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:733: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).
	PQescapeStringConn(state->conn, esc_table, table, strlen(table), &error);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:734:66:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	PQescapeStringConn(state->conn, esc_geo_col_name, geo_col_name, strlen(geo_col_name), &error);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:749: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).
		esc_schema = (char *) malloc(2 * strlen(schema) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:750: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).
		PQescapeStringConn(state->conn, esc_schema, schema, strlen(schema), &error);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:808: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).
				pszBasename = (char *) malloc(strlen(pszFilename)+5);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:810: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).
				for ( i = strlen(pszBasename)-1;
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:818: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).
				pszFullname = (char *) malloc(strlen(pszBasename) + 5);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:883: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).
			query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:883:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:883:83:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:890: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).
			query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:890:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			query = malloc(150 + 4 * strlen(state->geo_col_name) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:901: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).
			query = malloc(40 + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:901: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).
			query = malloc(40 + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:907: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).
			query = malloc(40 + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1188: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).
		(conn->host ? strlen(conn->host) : 0) + (conn->port ? strlen(conn->port) : 0) +
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1188: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).
		(conn->host ? strlen(conn->host) : 0) + (conn->port ? strlen(conn->port) : 0) +
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1189: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).
		(conn->username ? strlen(conn->username) : 0) + (conn->password ? strlen(conn->password) : 0) +
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1189:69:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		(conn->username ? strlen(conn->username) : 0) + (conn->password ? strlen(conn->password) : 0) +
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1190: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).
		(conn->database ? strlen(conn->database) : 0);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1217:3:  [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(connstring, "'");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1357: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).
		query = malloc(32 + strlen(state->table) + strlen(state->config->usrquery));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1357: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).
		query = malloc(32 + strlen(state->table) + strlen(state->config->usrquery));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1383: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).
		query = malloc(250 + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1383: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).
		query = malloc(250 + strlen(state->schema) + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1395: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).
		query = malloc(250 + strlen(state->table));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1532:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy(dbffieldname, ptr, 10);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1542:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(dbffieldname, mapped, 10);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1565: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).
			for (nameit = 0; nameit < strlen(dbffieldname); nameit++)
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1578:4:  [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(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message) - 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1578: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).
			strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message) - 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1770: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(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1770: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).
				strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1824:4:  [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(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1824: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).
			strncat(state->message, buf, SHPDUMPERMSGLEN - strlen(state->message));
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1849:8:  [1] (buffer) strlen:
  Does not handle 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( state->pgfieldnames[i]) + 10;	/*add extra space for the quotes to quote identify and any embedded quotes that may need escaping */
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1863: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(state->main_scan_query, ",");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:1878: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(state->main_scan_query, ",");
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:2080:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
					strncpy(hexewkb, val, hexewkb_len + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:2092: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).
			LWDEBUGF(4, "HexEWKB - length: %d  value: %s", strlen(hexewkb), hexewkb);
data/postgis-3.1.0~alpha3+dfsg/loader/pgsql2shp-core.c:2262: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).
	char	   *result = malloc(strlen(s) * 2 + 3);
data/postgis-3.1.0~alpha3+dfsg/loader/safileio.c:224: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).
    nMulti = strlen(pszFilename) + 1;
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-cli.c:304: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).
		for ( ptr = shp_file + strlen(shp_file); ptr > shp_file; ptr-- )
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-cli.c:314: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).
		for ( ptr = shp_file + strlen(shp_file); ptr > shp_file; ptr-- )
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:67: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).
	inbytesleft = strlen(inputbuf);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:746: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).
	for (j = 0; j < strlen(s); j++)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1100:2:  [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(state->col_names, "" );
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1135:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name, utf8str, MAXFIELDNAMELEN);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1146:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			  strncpy(name, mapped, MAXFIELDNAMELEN);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1172:17:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			size_t len = strlen(name);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1175:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(name2 + 2, name, len);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1189: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).
				snprintf(name + strlen(name),
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1190: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).
					 MAXFIELDNAMELEN - 1 - strlen(name),
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1253:3:  [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(state->col_names, "\"");
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1263: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(state->col_names, "\"");
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1477: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).
	ret = (char *)malloc(strlen((char *)stringbuffer_getstring(sb)) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1517: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).
		ret = (char *)malloc(strlen((char *)stringbuffer_getstring(sb)) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1638: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 (val[strlen(val) - 1] == '.')
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1639:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					val[strlen(val) - 1] = '\0';
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1659: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(val) == 0)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1703:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(val, utf8str, MAXVALUELEN);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1849: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).
	ret = (char *)malloc(strlen((char *)stringbuffer_getstring(sb)) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1856:6:  [1] (buffer) strlen:
  Does not handle 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((char *)stringbuffer_getstring(sbwarn)) > 0)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-core.c:1937: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).
	ret = (char *)malloc(strlen((char *)stringbuffer_getstring(sb)) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:380: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).
	if ( PQputCopyData(pg_connection, line, strlen(line)) < 0 )
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:438:7:  [1] (buffer) strlen:
  Does not handle 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(filename) > max_width)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:439: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).
			max_width = strlen(filename);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:564: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 (entry_encoding && strlen(entry_encoding) > 0)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:703: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).
		geocol_query = malloc(strlen(sql_form) + strlen(schema) + strlen(table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:703: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).
		geocol_query = malloc(strlen(sql_form) + strlen(schema) + strlen(table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:703:61:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		geocol_query = malloc(strlen(sql_form) + strlen(schema) + strlen(table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:917: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).
	table_start = loader_file_config->shp_file + strlen(loader_file_config->shp_file);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:925: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).
	table_end = loader_file_config->shp_file + strlen(loader_file_config->shp_file);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1471: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).
		query = malloc(strlen(sql_form) + strlen(loader_file_config->schema) + strlen(loader_file_config->table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1471: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).
		query = malloc(strlen(sql_form) + strlen(loader_file_config->schema) + strlen(loader_file_config->table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1471:74:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		query = malloc(strlen(sql_form) + strlen(loader_file_config->schema) + strlen(loader_file_config->table) + 1);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1539: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).
		for (i = strlen(loader_file_config->shp_file); i >= 0
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1542: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).
		progress_shapefile = malloc(strlen(loader_file_config->shp_file));
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1841: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).
		output_shapefile = malloc(strlen(folder_path) + strlen(dumper_table_config->shp_file) + 2);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:1841: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).
		output_shapefile = malloc(strlen(folder_path) + strlen(dumper_table_config->shp_file) + 2);
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2183:6:  [1] (buffer) strlen:
  Does not handle 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(new_text) == 0)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2342:6:  [1] (buffer) strlen:
  Does not handle 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(new_text) == 0)
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2412:6:  [1] (buffer) strlen:
  Does not handle 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(text))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2421:6:  [1] (buffer) strlen:
  Does not handle 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(text))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2430:6:  [1] (buffer) strlen:
  Does not handle 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(text))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2439:6:  [1] (buffer) strlen:
  Does not handle 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(text))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2448:6:  [1] (buffer) strlen:
  Does not handle 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(text))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2475: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 (conn->port && strlen(conn->port))
data/postgis-3.1.0~alpha3+dfsg/loader/shp2pgsql-gui.c:2477:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		for (i = 0; i < strlen(conn->port); i++)
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:250:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(map->pgfieldnames[curmapsize], tmpstr, fieldnamesize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:262:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy(map->dbffieldnames[curmapsize], tmpstr, fieldnamesize);
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:266: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(map->dbffieldnames[curmapsize]) > 10)
data/postgis-3.1.0~alpha3+dfsg/loader/shpcommon.c:299: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).
    cpglen = strlen(cpg);
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:308: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).
    int nLen = STATIC_CAST(int, strlen(pszBasename));
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:391:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen(pszFullname)*2+256;
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:415:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen(pszFullname)*2+256;
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:761:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen( pszFullname ) * 2 + 256;
data/postgis-3.1.0~alpha3+dfsg/loader/shpopen.c:801:30:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        size_t nMessageLen = strlen( pszFullname ) * 2 + 256;
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2312: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).
		nsp_tbl = palloc(strlen(nsp) + strlen(tbl) + 6);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2312: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).
		nsp_tbl = palloc(strlen(nsp) + strlen(tbl) + 6);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2322: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).
		nsp_tbl = palloc(strlen(nsp) + strlen(tbl) + 6);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2322: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).
		nsp_tbl = palloc(strlen(nsp) + strlen(tbl) + 6);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_estimate.c:2331: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).
		nsp_tbl = palloc(strlen(tbl) + 3);
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:81:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	str += sprintf(str, "(");
data/postgis-3.1.0~alpha3+dfsg/postgis/gserialized_typmod.c:99:9:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
	str += sprintf(str, ")");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_dump.c:170:22:  [1] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source is a constant character.
					if ( i ) ptr += sprintf(ptr, ",");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_basic.c:143: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).
	size_t result_sz = strlen(lwresult) + 8;
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_functions_basic.c:2858:6:  [1] (buffer) strlen:
  Does not handle 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(ospec) != 2)
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_geos.c:2566:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	for ( i = 0; i < strlen(patt); i++ )
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_in_geojson.c:43:15:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	size_t len = strlen(cstring);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_inout.c:132: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 hexsize = strlen(str);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_inout.c:245: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).
    (uint8_t *)format_str, strlen(format_str), GetDatabaseEncoding(), PG_UTF8);
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_inout.c:259: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).
    (uint8_t *)formatted_str, strlen(formatted_str),
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:165:3:  [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(result, "M");
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_ogc.c:167: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).
	SET_VARSIZE(text_ob, strlen(result) + VARHDRSZ); /* size of string */
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c:101:6:  [1] (buffer) strlen:
  Does not handle 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(geom_column) == 0)
data/postgis-3.1.0~alpha3+dfsg/postgis/lwgeom_out_geojson.c:395: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).
			if (!key_scalar && IsValidJsonNumber(outputstr, strlen(outputstr)))
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:278: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 size = strlen(name);
data/postgis-3.1.0~alpha3+dfsg/postgis/mvt.c:488: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).
	bool kept = add_value_as_string_with_size(ctx, value, strlen(value), tags, k);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:153: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).
	int oldlen = strlen(oldstr);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:154: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).
	int newlen = strlen(newstr);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:161: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).
	length = strlen(str) + found * (newlen - oldlen);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:174:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(result + reslen, str, length); /* Original part keeped */
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:192: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).
	for (j = strlen(str) - 1; j >= 0; j--)
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:210: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).
	tmp = rtalloc(sizeof(char) * (strlen(str) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:217:7:  [1] (buffer) strlen:
  Does not handle 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(tmp) || !delimiter || !strlen(delimiter)) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:217: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).
	if (!strlen(tmp) || !delimiter || !strlen(delimiter)) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:224: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).
		rtn[0] = (char *) rtalloc(sizeof(char) * (strlen(tmp) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:248: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).
		rtn[*n] = (char *) rtalloc(sizeof(char) * (strlen(token) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:281: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).
	ptr = ((char *) input) + strlen(input);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:285:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(input) - offset + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:291:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rtn, input, len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:313: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).
	ptr = ((char *) input) + strlen(input);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:317:8:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	len = strlen(input) - offset + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:323:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rtn, input, len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:324:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rtn[strlen(input) - offset] = '\0';
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:522: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).
		dst->srs = rtalloc(sizeof(char) * (strlen(src->srs) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:818:8:  [1] (buffer) strlen:
  Does not handle 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("COPY  () FROM stdin;") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:820:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:821: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:822: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).
	len += strlen(column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:824:10:  [1] (buffer) strlen:
  Does not handle 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(",") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:824: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).
		len += strlen(",") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:888:10:  [1] (buffer) strlen:
  Does not handle 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(tileset->line[x]) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:891: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).
				len += strlen(fn) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:916: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).
		len = strlen("INSERT INTO  () VALUES (ST_Transform(''::raster,xxxxxxxxx));") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:918: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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:919:10:  [1] (buffer) strlen:
  Does not handle 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(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:920:10:  [1] (buffer) strlen:
  Does not handle 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(column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:922: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(",") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:922: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 += strlen(",") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:932: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).
			sqllen += strlen(tileset->line[x]);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:934: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).
				sqllen += strlen(",''") + strlen(fn);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:934: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).
				sqllen += strlen(",''") + strlen(fn);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:977:8:  [1] (buffer) strlen:
  Does not handle 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("DROP TABLE IF EXISTS ;") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:979:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:980: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1010:8:  [1] (buffer) strlen:
  Does not handle 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("CREATE TABLE  (\"rid\" serial PRIMARY KEY, raster);") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1012:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1013: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1014: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).
	len += strlen(column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1016:10:  [1] (buffer) strlen:
  Does not handle 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(", text") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1016: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).
		len += strlen(", text") + strlen(file_column_name);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1018:10:  [1] (buffer) strlen:
  Does not handle 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(" TABLESPACE ") + strlen(tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1018:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len += strlen(" TABLESPACE ") + strlen(tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1020:10:  [1] (buffer) strlen:
  Does not handle 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(" USING INDEX TABLESPACE ") + strlen(idx_tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1020: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).
		len += strlen(" USING INDEX TABLESPACE ") + strlen(idx_tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1063:8:  [1] (buffer) strlen:
  Does not handle 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("CREATE INDEX \"__gist\" ON  USING gist (st_convexhull());") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1065:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1066: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).
	len += strlen(_table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1067: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).
	len += strlen(_column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1068: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1069: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).
	len += strlen(column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1071:10:  [1] (buffer) strlen:
  Does not handle 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(" TABLESPACE ") + strlen(tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1071:35:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
		len += strlen(" TABLESPACE ") + strlen(tablespace);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1105:8:  [1] (buffer) strlen:
  Does not handle 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("ANALYZE ;") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1107:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1108: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1135:8:  [1] (buffer) strlen:
  Does not handle 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("VACUUM ANALYZE ;") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1137:10:  [1] (buffer) strlen:
  Does not handle 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(schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1138: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).
	len += strlen(table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1192:8:  [1] (buffer) strlen:
  Does not handle 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("SELECT AddRasterConstraints('','','',TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,FALSE,TRUE,TRUE,TRUE,TRUE,FALSE);") + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1194:10:  [1] (buffer) strlen:
  Does not handle 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(_schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1195: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).
	len += strlen(_table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1196: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).
	len += strlen(_column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1287:8:  [1] (buffer) strlen:
  Does not handle 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("SELECT AddOverviewConstraints('','','','','','',);") + 5;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1289:10:  [1] (buffer) strlen:
  Does not handle 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(_ovschema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1290: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).
	len += strlen(_ovtable);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1291: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).
	len += strlen(_ovcolumn);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1293:10:  [1] (buffer) strlen:
  Does not handle 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(_schema);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1294: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).
	len += strlen(_table);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1295: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).
	len += strlen(_column);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:1589: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).
		info->srs = rtalloc(sizeof(char) * (strlen(pszProjectionRef) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2467: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).
			const size_t len = (strlen(argv[++argit]) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2474:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(config->raster_column, argv[argit], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2482: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).
			const size_t len = (strlen(argv[++argit]) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2489:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(config->file_column_name, argv[argit], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2552: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).
			const size_t len = (strlen(argv[++argit]) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2559:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(config->tablespace, argv[argit], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2563: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).
			const size_t len = (strlen(argv[++argit]) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2570:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(config->idx_tablespace, argv[argit], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2637:10:  [1] (buffer) strlen:
  Does not handle 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(argv[argit]) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2644:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(config->rt_file[config->rt_file_count - 1], argv[argit], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2686: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).
				config->table = rtalloc(sizeof(char) * (strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2686:98:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				config->table = rtalloc(sizeof(char) * (strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2692: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).
				snprintf(config->table, strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema), "%s", ptr + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2692:82:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				snprintf(config->table, strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema), "%s", ptr + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2693:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				config->table[strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema)] = '\0';
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2693:72:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
				config->table[strlen(config->rt_file[config->rt_file_count - 1]) - strlen(config->schema)] = '\0';
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2697: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).
				const size_t len = strlen(config->rt_file[config->rt_file_count - 1]) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2704:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(config->table, config->rt_file[config->rt_file_count - 1], len);
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2743: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).
		file = rtalloc(sizeof(char) * (strlen(config->rt_file[i]) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2751: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 (ptr = file + strlen(file); ptr > file; ptr--) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2758: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).
		config->rt_filename[i] = rtalloc(sizeof(char) * (strlen(ptr) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2777: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).
		file = rtalloc(sizeof(char) * (strlen(config->rt_filename[0]) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2785: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 (ptr = file + strlen(file); ptr > file; ptr--) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2792: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).
		config->table = rtalloc(sizeof(char) * (strlen(file) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2804: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).
		config->raster_column = rtalloc(sizeof(char) * (strlen("rast") + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2815: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).
		config->file_column_name = rtalloc(sizeof(char) * (strlen("filename") + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2860: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).
			config->overview_table[i] = rtalloc(sizeof(char) * (strlen("o__") + strlen(factor) + strlen(config->table) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2860:72:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			config->overview_table[i] = rtalloc(sizeof(char) * (strlen("o__") + strlen(factor) + strlen(config->table) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2860:89:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
			config->overview_table[i] = rtalloc(sizeof(char) * (strlen("o__") + strlen(factor) + strlen(config->table) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2874: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).
	if (config->schema != NULL && strlen(config->schema) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2880: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).
	if (config->table != NULL && strlen(config->table) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2886: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).
	if (config->raster_column != NULL && strlen(config->raster_column) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2892: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).
	if (config->file_column_name != NULL && strlen(config->file_column_name) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2898: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).
	if (config->tablespace != NULL && strlen(config->tablespace) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2904: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 (config->idx_tablespace != NULL && strlen(config->idx_tablespace) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2912:8:  [1] (buffer) strlen:
  Does not handle 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(config->overview_table[i]) > MAXNAMELEN) {
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2926: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->schema) + 4));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2938: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->table) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2950: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->raster_column) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2962: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->file_column_name) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2974: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->tablespace) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2986: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).
		tmp = rtalloc(sizeof(char) * (strlen(config->idx_tablespace) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/loader/raster2pgsql.c:2999: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).
			tmp = rtalloc(sizeof(char) * (strlen(config->overview_table[i]) + 3));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:165: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).
	pathlen = strlen(path);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_band.c:449: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).
	else if (!strlen(band->data.offline.path)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_pixel.c:81: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).
	assert(pixname && strlen(pixname) > 0);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1619: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).
	if (format == NULL || !strlen(format))
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1759: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 txt_len = strlen(txt);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1766: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).
		txt_len = strlen(txt);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1773: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).
		txt_len = strlen(txt);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:1884: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 (NULL != srs && strlen(srs)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_raster.c:2576: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 (NULL != srs && strlen(srs)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:63: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).
    assert(0 == strlen(hex) % 2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:492: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).
			size += strlen(band->data.offline.path) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:687: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).
			ptr += strlen(band->data.offline.path) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_serialize.c:882: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).
			pathlen = strlen((char*) ptr);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:94: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).
	assert(algname != NULL && strlen(algname) > 0);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:183: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).
	if (NULL == request || !strlen(request))
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:194: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).
	assert(name != NULL && strlen(name) > 0);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:290: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).
				size_t authorityName_len = strlen(pszAuthorityName) +1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:291: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).
				size_t authorityCode_len = strlen(pszAuthorityCode) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:303:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(*authname, pszAuthorityName, authorityName_len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:304:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(*authcode, pszAuthorityCode, authorityCode_len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_util.c:362: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).
	if (drv == NULL || !strlen(drv) || count < 1)
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c:327: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).
			size_t sz = sizeof(char) * (strlen(lbl) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c:328: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 ( srs ) sz += strlen(srs);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_warp.c:872:71:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	arg->wopts->papszWarpOptions[0] = (char *) CPLMalloc(sizeof(char) * (strlen("INIT_DEST=NO_DATA") + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:473: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).
			size += strlen(band->data.offline.path) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_core/rt_wkb.c:650: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).
			ptr += strlen(band->data.offline.path) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:173: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 = VARHDRSZ + strlen(ptr);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:631: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).
			charlen = strlen(chartmp) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:633:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(bmd[i].pixeltype, chartmp, charlen);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:650: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).
				charlen = strlen(chartmp) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:652:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
				strncpy(bmd[i].bandpath, chartmp, charlen);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_band_properties.c:730: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).
		if (bmd2[call_cntr].bandpath && strlen(bmd2[call_cntr].bandpath)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_create.c:621:8:  [1] (buffer) strlen:
  Does not handle 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(outdbfile)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_gdal.c:251: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)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_gdal.c:252: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).
					options[j] = (char *) palloc(sizeof(char) * (strlen(option) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_geometry.c:899: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(pixeltype)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_geometry.c:1215: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).
		options[options_len - 1] = palloc(sizeof(char*) * (strlen("ALL_TOUCHED=TRUE") + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_inout.c:55: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:64: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 oldlen = strlen(oldstr);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:65: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 newlen = strlen(newstr);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:72: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).
	length = strlen(str) + found * (newlen - oldlen);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:85:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(result + reslen, str, length); /* Original part keeped */
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:103: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).
	for (j = strlen(str) - 1; j >= 0; j--)
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:125: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).
	ptr = ((char *) input) + strlen(input);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:129: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).
	rtn = palloc(sizeof(char) * (strlen(input) - offset + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:134: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).
	memcpy(rtn, input, strlen(input) - offset);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:135:6:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	rtn[strlen(input) - offset] = '\0';
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:152: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).
	tmp = palloc(sizeof(char) * (strlen(str) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:159:7:  [1] (buffer) strlen:
  Does not handle 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(tmp) || !delimiter || !strlen(delimiter)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:159: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).
	if (!strlen(tmp) || !delimiter || !strlen(delimiter)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:166: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).
		rtn[0] = (char *) palloc(sizeof(char) * (strlen(tmp) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:190: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).
		rtn[*n] = (char *) palloc(sizeof(char) * (strlen(token) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:242: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).
	inputlen = strlen(input);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:254:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy(rtn, input, inputlen - offset);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:266: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).
	int s1len = strlen(s1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:267: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).
	int s2len = strlen(s2);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:310: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).
	len = sizeof(char) * (strlen("SELECT CASE WHEN (upper(auth_name) = 'EPSG' OR upper(auth_name) = 'EPSGA') AND length(COALESCE(auth_srid::text, '')) > 0 THEN upper(auth_name) || ':' || auth_srid WHEN length(COALESCE(auth_name, '') || COALESCE(auth_srid::text, '')) > 0 THEN COALESCE(auth_name, '') || COALESCE(auth_srid::text, '') ELSE '' END, proj4text, srtext FROM spatial_ref_sys WHERE srid =  LIMIT 1") + MAX_INT_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:349:4:  [1] (buffer) strlen:
  Does not handle 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(tmp) &&
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:354:10:  [1] (buffer) strlen:
  Does not handle 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(tmp) + 1;
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_internal.c:363:4:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
			strncpy(srs, tmp, len);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1520: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).
		len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1520: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).
		len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1520: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).
		len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1529: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).
		memcpy(sql, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1530: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).
		memcpy(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1530: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).
		memcpy(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1531: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).
		memcpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1531: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).
		memcpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1531:74:  [1] (buffer) strlen:
  Does not handle 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(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:1729:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
	assert(cutype && strlen(cutype) > 0);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3743:7:  [1] (buffer) strlen:
  Does not handle 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(dash_set[c]) == 1 && (
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3751: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).
						junk = palloc(sizeof(char) * (strlen(dash_set[c + 1]) + 2));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3764:59:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
						dash_set[c] = repalloc(dash_set[c], sizeof(char) * (strlen(junk) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:3770:65:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
							dash_set[dash_it - 1] = repalloc(dash_set[dash_it - 1], (strlen(dash_set[dash_it]) + 1) * sizeof(char));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4241:8:  [1] (buffer) strlen:
  Does not handle 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(colormap)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4282: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(_entry)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4698: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).
        len = strlen("SELECT (") + strlen(expression) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4698: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).
        len = strlen("SELECT (") + strlen(expression) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4698: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).
        len = strlen("SELECT (") + strlen(expression) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4701: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).
        memcpy(initexpr, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4702: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).
        memcpy(initexpr + strlen("SELECT ("), expression, strlen(expression));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4702:59:  [1] (buffer) strlen:
  Does not handle 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(initexpr + strlen("SELECT ("), expression, strlen(expression));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4703: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).
        memcpy(initexpr + strlen("SELECT (") + strlen(expression), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4703: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).
        memcpy(initexpr + strlen("SELECT (") + strlen(expression), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:4703:91:  [1] (buffer) strlen:
  Does not handle 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(initexpr + strlen("SELECT (") + strlen(expression), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6813: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).
					len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6813: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).
					len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6813: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).
					len = strlen("SELECT (") + strlen(expr) + strlen(")::double precision");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6832: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).
					memcpy(sql, "SELECT (", strlen("SELECT ("));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6833:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					memcpy(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6833: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).
					memcpy(sql + strlen("SELECT ("), expr, strlen(expr));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6834:19:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
					memcpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6834: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).
					memcpy(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_mapalgebra.c:6834:77:  [1] (buffer) strlen:
  Does not handle 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(sql + strlen("SELECT (") + strlen(expr), ")::double precision", strlen(")::double precision"));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:239:7:  [1] (buffer) strlen:
  Does not handle 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(tablename)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:251:7:  [1] (buffer) strlen:
  Does not handle 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(colname)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:288: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).
	len = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:288:82:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:288:105:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1268:8:  [1] (buffer) strlen:
  Does not handle 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(tablename)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1283:8:  [1] (buffer) strlen:
  Does not handle 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(colname)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1386: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 = sizeof(char) * (strlen("SELECT min, max FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1386:94:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT min, max FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1386:114:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT min, max FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1421: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).
		if (NULL == tmp || !strlen(tmp)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1437: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).
		if (NULL == tmp || !strlen(tmp)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1454: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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1454:83:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:1454:106:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2043:8:  [1] (buffer) strlen:
  Does not handle 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(tablename)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2058:8:  [1] (buffer) strlen:
  Does not handle 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(colname)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2148: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 = sizeof(char) * (strlen("SELECT count FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2148:91:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT count FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2148:111:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT count FROM _st_summarystats('','',,::boolean,)") + strlen(tablename) + strlen(colname) + (MAX_INT_CHARLEN * 2) + MAX_DBL_CHARLEN + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2180: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).
		if (NULL == tmp || !strlen(tmp)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2195: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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2195:83:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2195:106:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2679:8:  [1] (buffer) strlen:
  Does not handle 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(tablename)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2694:8:  [1] (buffer) strlen:
  Does not handle 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(colname)) {
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2772: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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2772:83:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_statistics.c:2772:106:  [1] (buffer) strlen:
  Does not handle 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 = sizeof(char) * (strlen("SELECT \"\" FROM \"\" WHERE \"\" IS NOT NULL") + (strlen(colname) * 2) + strlen(tablename) + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:65: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).
    result = palloc(VARHDRSZ  + strlen(ver));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:66: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).
    SET_VARSIZE(result, VARHDRSZ + strlen(ver));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:67: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).
    memcpy(VARDATA(result), ver, strlen(ver));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:80: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).
		rtn = palloc(strlen(ver) + strlen(" GDAL_DATA not found") + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_utility.c:80: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).
		rtn = palloc(strlen(ver) + strlen(" GDAL_DATA not found") + 1);
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpg_wkb.c:188: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:360: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).
				gdal_skip = palloc(sizeof(char) * (strlen(drv_set[i].short_name) + 1));
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:367:7:  [1] (buffer) strlen:
  Does not handle 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(gdal_skip) + 1 + strlen(drv_set[i].short_name) + 1
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:367: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).
						strlen(gdal_skip) + 1 + strlen(drv_set[i].short_name) + 1
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:370:5:  [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(gdal_skip, " ");
data/postgis-3.1.0~alpha3+dfsg/raster/rt_pg/rtpostgis.c:439: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).
			sizeof(char) * (strlen(GDAL_DISABLE_ALL) + 1)
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_gdal.c:40: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).
		CU_ASSERT(strlen(drv[i].short_name));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_gdal.c:67: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).
	wkb_len = (int) ceil(((double) strlen(wkb_hex)) / 2);
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:55: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:75: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:113: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:133: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:163: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:195: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:230: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:284: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:332: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:383: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:418: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:469: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:501: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:533: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:565: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:608: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:660: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).
	raster = rt_raster_from_hexwkb(hexwkb, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/raster/test/cunit/cu_raster_wkb.c:776: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).
	CU_ASSERT_EQUAL(len, strlen(hexwkb));
data/postgis-3.1.0~alpha3+dfsg/sfcgal/lwgeom_sfcgal.c:207: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).
	g = sfcgal_io_read_ewkt(cstring, strlen(cstring));

ANALYSIS SUMMARY:

Hits = 1883
Lines analyzed = 232544 in approximately 6.97 seconds (33356 lines/second)
Physical Source Lines of Code (SLOC) = 162730
Hits@level = [0] 642 [1] 669 [2] 817 [3]  11 [4] 385 [5]   1
Hits@level+ = [0+] 2525 [1+] 1883 [2+] 1214 [3+] 397 [4+] 386 [5+]   1
Hits/KSLOC@level+ = [0+] 15.5165 [1+] 11.5713 [2+] 7.46021 [3+] 2.43962 [4+] 2.37203 [5+] 0.00614515
Dot directories skipped = 3 (--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.