Well, if that's the case I'm not totally sure what to do about this.
Because the calling convention of that method dictates that the caller
must allocate a buffer for the result.
I suppose in that case we would have to change the calling convention of
the method to return the string of whatever length (but the caller would
be responsible for deallocating it), which is not the greatest in terms
of a memory ownership model.. Or we could do the (annoying) microsoft
thing and if the allocated size of the parameter isn't enough we could
return an error and then set the size we think it should be..?
I think for a first pass I'm going to put this particular issue aside..
but I could see how it might result in a buffer overflow exploit so
probably it should be fixed long term.
On 11-05-16 11:54 AM, Steinar H. Gunderson wrote:
> Den 16. mai 2011 17:17 skrev David Stuart <dstuart_at_counterpath.com> følgende:
>> The longest IPv6 address is actually something like:
> This is not an address, though; the zone ID syntax is a Microsoft
> invention. (Linux uses something similar, but doesn't use numerical
> zone IDs, so “addresses” there can in theory be of near-infinite
> size.) Link-local is generally not all that standardized.
> /* Steinar */
David Stuart, CounterPath
Email: dstuart (at) counterpath (dot) com
Phone: (613) 254-8886 x2234 Web: http://www.counterpath.com/
Address: 310 - 350 Terry Fox Drive, Kanata Ontario, K2K 2P5
Received on 2011-05-16