Opened 17 years ago

Last modified 15 years ago

#132 closed defect (fixed)

CAPI GEOSEqualsExact() segfaults comparing POINTs

Reported by: hrz@… Owned by: strk@…
Priority: critical Milestone:
Component: C API Version: main
Severity: Significant Keywords: imported, phpbugtracker
Cc: mloskot

Description (last modified by mloskot)

To be exact, it segfaults when one of the points is empty. I.e., the following code fails:

 geom = GEOSGeomFromWKT("POINT(44 32.2)");
 geom2 = GEOSGeomFromWKT("POINT EMPTY");
 GEOSEqualsExact(geom, geom2, 0);

A backtrace looks like:

#0  geos::geom::Geometry::equal (this=0x80f91d8, a=@0x0, b=@0x80fd6b0, tolerance=0) at Coordinate.inl:80
#1  0xb7aebe84 in geos::geom::Point::equalsExact (this=0x80f91d8, other=0x80f0fd8, tolerance=0) at Point.cpp:200
#2  0xb7ba80d3 in GEOSEqualsExact (g1=0x80f91d8, g2=0x80f0fd8, tolerance=0) at geos_c.cpp:414

System details are the same as reported in bug #126

Change History (4)

comment:1 by strk@…, 17 years ago

Resolution: nonefixed
Fix is in head, please test.

comment:2 by hrz@…, 17 years ago

It works a treat - thanks.

comment:3 by mloskot, 16 years ago

Cc: mloskot added
Component: C-APIC API
Description: modified (diff)
Milestone: imported3.0.0
Priority: 1critical
Severity: UnassignedSignificant
Version: 3.0.0svn-trunk

comment:4 by (none), 15 years ago

Milestone: 3.0.0

Milestone 3.0.0 deleted

Note: See TracTickets for help on using tickets.