> -----Original Message-----
> From: Ivan Zhakov [mailto:ivan_at_visualsvn.com]
> Sent: Friday, February 27, 2009 11:04 PM
> To: dev_at_subversion.tigris.org; rhuijben_at_sharpsvn.net
> Subject: Re: svn commit: r36202 - trunk/subversion/libsvn_ra_serf
>
> On Sat, Feb 28, 2009 at 12:50 AM, Bert Huijben <rhuijben_at_sharpsvn.net>
> wrote:
> > @@ -280,7 +281,7 @@ handle_checkout(serf_request_t *request,
> > }
> > apr_uri_parse(pool, location, &uri);
This allocates uri in pool.
> >
> > - ctx->resource_url = apr_pstrdup(ctx->pool, uri.path);
> > + ctx->resource_url = svn_uri_canonicalize(uri.path, ctx->pool);
> > }
> You introduce memory management error here, because
> svn_uri_canonicalize() does not guarantee that passed uri will be
> copied to pool. See include\svn_direent_uri.h:323
> [[[
> * The returned uri may be statically allocated, equal to @a uri, or
> * allocated from @a pool.
> ]]]
As uri is also allocated in pool, this can't create lifetime issues.
Bert
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1241136
Received on 2009-02-27 23:16:43 CET