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

Re: svn commit: r36202 - trunk/subversion/libsvn_ra_serf

From: Ivan Zhakov <ivan_at_visualsvn.com>
Date: Sat, 28 Feb 2009 01:04:28 +0300

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);
>
> -      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.
]]]

-- 
Ivan Zhakov
VisualSVN Team
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1241096
Received on 2009-02-27 23:04:44 CET

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.