[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1096460 - /subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c

From: Hyrum K Wright <hyrum_at_hyrumwright.org>
Date: Mon, 25 Apr 2011 07:28:35 -0500

This looks like it could be long-standing bug. Backport?

-Hyrum

On Mon, Apr 25, 2011 at 6:47 AM, <rhuijben_at_apache.org> wrote:
> Author: rhuijben
> Date: Mon Apr 25 11:47:42 2011
> New Revision: 1096460
>
> URL: http://svn.apache.org/viewvc?rev=1096460&view=rev
> Log:
> For ra_local, allocate the result for svn_ra_get_repos_root() and
> svn_ra_get_uuid() in the right pool. (see svn_ra.h)
>
> Found by testing with apr_allocator_max_free_set(allocator, 1); in
> subversion/svn/main.c.
>
> * subversion/libsvn_ra_local/ra_plugin.c
>  (svn_ra_local__get_uuid,
>   svn_ra_local__get_repos_root): Duplicate paths in the right pool.
>
> Modified:
>    subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
>
> Modified: subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c?rev=1096460&r1=1096459&r2=1096460&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_local/ra_plugin.c Mon Apr 25 11:47:42 2011
> @@ -586,7 +586,7 @@ svn_ra_local__get_uuid(svn_ra_session_t
>                        apr_pool_t *pool)
>  {
>   svn_ra_local__session_baton_t *sess = session->priv;
> -  *uuid = sess->uuid;
> +  *uuid = apr_pstrdup(pool, sess->uuid);
>   return SVN_NO_ERROR;
>  }
>
> @@ -596,7 +596,7 @@ svn_ra_local__get_repos_root(svn_ra_sess
>                              apr_pool_t *pool)
>  {
>   svn_ra_local__session_baton_t *sess = session->priv;
> -  *url = sess->repos_url;
> +  *url = apr_pstrdup(pool, sess->repos_url);
>   return SVN_NO_ERROR;
>  }
>
>
>
>
Received on 2011-04-25 14:29:10 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.