Opened 14 years ago

Closed 14 years ago

#636 closed defect (fixed)

ExpressionEngine: segv when no filterCapabilities passed to ValidateFilter.

Reported by: brentrobinson Owned by: brentrobinson
Priority: major Milestone: 3.6.0
Component: Utilities API Version: 3.5.0
Severity: 1 Keywords: Expression Engine filter capabilities segv
Cc: External ID:

Description

The following:

    clock_t start = clock();

    FdoPtr<FdoIConnection> conn;
    // ... open a connection to any provider and datastore
    
    FdoPtr<FdoISelect> select = 
        (FdoISelect*)conn->CreateCommand(FdoCommandType_Select); 
    
    FdoPtr<FdoFgfGeometryFactory> gf = FdoFgfGeometryFactory::GetInstance();

    double ordsXYExt[10];
    double llx = 465000;
    double lly = 172000;
    double urx = 467000;
    double ury = 175000;
    ordsXYExt[0] = llx; ordsXYExt[1] = lly;
    ordsXYExt[2] = llx; ordsXYExt[3] = ury;
    ordsXYExt[4] = urx; ordsXYExt[5] = ury; 
    ordsXYExt[6] = urx; ordsXYExt[7] = lly;
    ordsXYExt[8] = llx; ordsXYExt[9] = lly;

    FdoPtr<FdoILinearRing> extRing = 
        gf->CreateLinearRing(FdoDimensionality_XY, 10, ordsXYExt);
    FdoPtr<FdoIPolygon> poly = gf->CreatePolygon(extRing, NULL );
    FdoPtr<FdoGeometryValue> geomValue = 
        FdoGeometryValue::Create(FdoPtr<FdoByteArray>(gf->GetFgf(poly)));


    FdoPtr<FdoSpatialCondition> spatialFilter = 
        FdoPtr<FdoSpatialCondition>(FdoSpatialCondition::Create(L"the_geom",
            FdoSpatialOperations_EnvelopeIntersects,
            geomValue));
	
    FdoPtr<FdoIFeatureReader> rdr = select->Execute();
    
    FdoPtr<FdoExpressionEngine> engine = 
        FdoExpressionEngine::Create(rdr, rdr->GetClassDefinition(), NULL);

    engine->ValidateFilter(rdr->GetClassDefinition(), spatialFilter);

leads to a segmentation violation.

Change History (1)

comment:1 by brentrobinson, 14 years ago

Resolution: fixed
Status: newclosed

Revision: 5447 Author: brentrobinson Date: 2:00:40 PM, Thursday, April 01, 2010 Message: Ticket#636: Guard call to filterCapabilities function when filterCapabilites are NULL.


Modified : /trunk/Utilities/ExpressionEngine/Src/FdoExpressionEngineImp.cpp

Note: See TracTickets for help on using tickets.