Opened 5 weeks ago

#4073 new defect

[raster] ST_AsRaster crashes when geometry touches pixels near a boundary

Reported by: lightinthedark Owned by: Bborie Park
Priority: medium Milestone: PostGIS 2.4.5
Component: raster Version: 2.4.x
Keywords: ST_AsRaster segfault Cc:

Description

The following query causes a segfault (process terminated with signal 11)

SELECT ST_AsRaster(
      ST_GeomFromText('POLYGON((4.5 3, 4.5 2.001, 3.5 1.999, 4.5 3))'),
      1::FLOAT, 1::FLOAT,
      0, 0, '1BB', 1, 0, 0, 0, true
  );

Changing the “touched” parameter to false or reducing the precision of the y value of the 2nd or 3rd points eliminates the error.


Running the mdillon/postgis:9.6-alpine docker image.

SELECT PostGIS_Full_Version();

POSTGIS="2.4.3" PGSQL="96" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.3, released 2017/11/20" LIBXML="2.9.5" LIBJSON="0.12.1" LIBPROTOBUF="1.2.1" (core procs from "2.4.3" need upgrade) TOPOLOGY (topology procs from "2.4.3" need upgrade) RASTER (raster procs from "2.4.3" need upgrade)

Change History (0)

Note: See TracTickets for help on using tickets.