#3389 closed defect (fixed)

Buffer overflow in lwgeom_to_geojson

Reported by: dbaston Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.8
Component: postgis Version: 2.0.x
Keywords: Cc:


Occurs when writing POLYGON EMPTY to GeoJSON. The problem code was flagged with clang's "scan-build" command, and I confirmed the overflow with -fsanitize=address. Patch is forthcoming.

Change History (2)

comment:1 Changed 23 months ago by dbaston

I started adding cunit tests for the various empty geometry cases to cu_out_geojson.c and then realized I have no idea how these cases are supposed to look in GeoJSON. The POLYGON EMPTY case seems to be the only one with a memory bug, though.

comment:2 Changed 23 months ago by dbaston

Resolution: fixed
Status: newclosed

Patched in trunk at r14474

2.2 at r14475

2.1 at r14476

2.0 at r14477

Note: See TracTickets for help on using tickets.