Oracle-Spatial: Crash
Benedikt Rothe
umn-ms at HYDROTEC.DE
Wed Nov 15 02:53:23 PST 2006
Hello list-members, hello Fernando Simon
We are using Mapserver with Java/Oracle and found crashes (of the hole VM)
in some
calls of layerObj.getFeature(int shapeindex, int tileindex);
As fare as I can see, the crashes occure when the queried SDO_Geometry has
value null.
Digging in maporaclespatial.c /msOracleSpatialLayerGetShape:
Line 2155 (in Version 4.10.0)
success = TRY( hand, OCIDefineByPos( dthand->stmthp,
&items[i], .....
(where i is index over selected columns)
The array "items" is allocated and initialized with only one element.
Therefore &items[i] is a pointer to
arbitrary memory for i > 0. This seems to cause the crash.
Changed the code in the obvious way:
- items declared as
OCIDefine **items;
- allocation:
items = calloc(sizeof(OCIDefine*),layer->numitems);
The Crashes we detected disappeared. No harmfull side-effects found.
Cleaning of the allocated memory is still needed. (As fare as I can see
memory cleaning is also
missing for the variable nullind.)
Same problem in msOracleSpatialLayerGetExtent.
Greetings
Benedikt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061115/8d8cebdf/attachment.htm>
More information about the MapServer-users
mailing list