<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I would add a second method with size param and deprecate the
current one.<br>
This way we can prepare our own code and remove the dangerous method
in 3.0<br>
<br>
Matthias<br>
<br>
<div class="moz-cite-prefix">On 01/26/2016 01:00 PM, Nathan Woodrow
wrote:<br>
</div>
<blockquote
cite="mid:CAAi8Yg-k7KTc-obcYs2iBdaCrzGqYWqYdevpHE+yJzTkrYLDLg@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a moz-do-not-send="true"
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 moz-do-not-send="true"
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>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Matthias Kuhn
OPENGIS.ch - <a class="moz-txt-link-freetext" href="https://www.opengis.ch">https://www.opengis.ch</a>
Spatial • (Q)GIS • PostGIS • Open Source</pre>
</body>
</html>