<div dir="ltr">I think as long as you can make it optional then it doesn't break any of the APIs and should be fine.<div><br></div><div>That is just my thoughts.  Maybe see what others think first before doing it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 9:22 PM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been watching memory corruptions happening during WKB parsing [1]<br>
and found the internal QgsAbstractGeometryV2::fromWkb method not<br>
taking a size parameter to allow preventing such memory errors from<br>
occurring. This needs be changed before it spreads too much !<br>
<br>
The current method is virtual:<br>
<br>
  virtual bool fromWkb( const unsigned char * wkb ) = 0;<br>
<br>
It'll need to be changed to take a size parameter.<br>
<br>
Is that something we can do for this upcoming release or should<br>
we just hope all our WKB providers will pass us good WKB ?<br>
<br>
Note this all started from OGR giving a WKB which may even be<br>
considered valid but our parser did not expect (3D components<br>
inside a marked-to-be-2D collection).<br>
<br>
[1] <a href="http://hub.qgis.org/issues/12416" rel="noreferrer" target="_blank">http://hub.qgis.org/issues/12416</a><br>
<br>
--strk;<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div><br></div>