Opened 18 years ago

Last modified 17 years ago

#1736 closed defect

WMS getFeatureInfo with OracleSpatial layer crashes — at Initial Version

Reported by: arovira@… Owned by: fsimon@…
Priority: high Milestone: 5.0 release
Component: Input - Native Oracle Spatial Support Version: unspecified
Severity: major Keywords:
Cc: umn-ms@…

Description

Hi,

I've made some tests of WMS getFeatureInfo with VML output and I get some 
crashes when I was using OracleSpatial layers.

After some debug I found there is an error in function 
msOracleSpatialLayerGetShape. This function creates a 1 position array.
An then access more positions of this array. the lines involved are:

2069: OCIDefine *adtp = NULL, *items[QUERY_SIZE] = { NULL };

and

2151: success = TRY( hand, OCIDefineByPos( dthand->stmthp, &items[i], hand-
>errhp, (ub4)i+1, (dvoid *)layerinfo->items_query[i], (sb4)TEXT_SIZE, SQLT_STR, 
(sb2 *)&nullind[i], (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT ) );

I modified last line to:

success = TRY( hand, OCIDefineByPos( dthand->stmthp, &items[0], hand->errhp, 
(ub4)i+1, (dvoid *)layerinfo->items_query[i], (sb4)TEXT_SIZE, SQLT_STR, (sb2 *)
&nullind[i], (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT ) );

and the crash disappeared.

I don't know OCI's API so I don't know if this solution correct. 
Any Oracle guru that can check it ?


Albert Rovira
Nexus Geografics

Change History (0)

Note: See TracTickets for help on using tickets.