Stefan Fuhrmann wrote:

> [...] As already discussed on IRC, the real cause here
> is that _ensure() should follow the first invariant listed
> in svn_string.h by allocating *additional* space for
> the terminating 0. In particular svn_stringbuf_ensure()
> is inconsistent with svn_stringbuf_create_ensure()
> in this respect.
> 
> Fixing that is somewhat hard as all callers need to
> be inspected for potential side-effects. _ensure2()
> would probably be the better solution.

I'm following up with a patch in a new thread "[PATCH] String creation -- 
ensuring space for the NUL", 
<http://svn.haxx.se/dev/archive-2012-02/0415.shtml>.

- Julian

Reply via email to