[Qgis-developer] Can I change QgsAbstractGeometryV2::fromWkb signature ?

Sandro Santilli strk at keybit.net
Tue Jan 26 03:22:28 PST 2016

I've been watching memory corruptions happening during WKB parsing [1]
and found the internal QgsAbstractGeometryV2::fromWkb method not
taking a size parameter to allow preventing such memory errors from
occurring. This needs be changed before it spreads too much !

The current method is virtual:

  virtual bool fromWkb( const unsigned char * wkb ) = 0;

It'll need to be changed to take a size parameter.

Is that something we can do for this upcoming release or should
we just hope all our WKB providers will pass us good WKB ?

Note this all started from OGR giving a WKB which may even be
considered valid but our parser did not expect (3D components
inside a marked-to-be-2D collection).

[1] http://hub.qgis.org/issues/12416


More information about the Qgis-developer mailing list