On 25/02/2019 10:41, R.Wieser wrote:
> Wouter,
>
>> Except that strn... is not guaranteed to be thread-safe.
>
> You mean that the other thread could throw the string away and invalidate
> the memory, causing "strn..." to try to access memory thats not available
> anymore ? True. But thats a whole other can of worms.
That too.
Also that between strn... starting to do its operation and finishing it,
another thread might have grown (or shrunk) the string.
> Besides, the resulting exception/crash would be a whole lot better than the
> silent memory overrun a non-terminated string c|would cause. :-)
Sure.
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|