Aiiiiiieee. Backport to 1.4.x and 1.3.x, I take it?
On Wed, 13 Dec 2006, dionisos@tigris.org wrote:
> Author: dionisos
> Date: Wed Dec 13 13:39:19 2006
> New Revision: 22689
>
> Log:
> Fix off-by-1 error.
>
> * subversion/libsvn_subr/svn_string.c
> (svn_stringbuf_ensure): Be sure to copy the trailing
> - but like strlen() uncounted - nul character into the new data block.
>
>
> Modified:
> trunk/subversion/libsvn_subr/svn_string.c
>
> Modified: trunk/subversion/libsvn_subr/svn_string.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_subr/svn_string.c?pathrev=22689&r1=22688&r2=22689
> ==============================================================================
> --- trunk/subversion/libsvn_subr/svn_string.c (original)
> +++ trunk/subversion/libsvn_subr/svn_string.c Wed Dec 13 13:39:19 2006
> @@ -356,10 +356,12 @@
> }
> }
>
> - str->data = (char *) my__realloc(str->data,
> - str->len,
> + str->data = (char *) my__realloc(str->data,
> + str->len + 1,
> + /* We need to maintain (and thus copy)
> + the trailing nul */
> str->blocksize,
> - str->pool);
> + str->pool);
> }
> }
- application/pgp-signature attachment: stored
Received on Wed Dec 13 23:09:05 2006