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

Re: [PATCH] Segfault when comitting property changes on wc root

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-03-21 16:53:56 CET

Vladimir Prus <ghost@cs.msu.su> writes:

> I've just got segfault from svn when trying to comit after setting
> "svn:externals" on wc root. The reproduction recipe is attached,
> and the patch is below.

Any property change on the root directory is affected. It's
unfortunate this got into 0.20.

> Log message:
> Fix segfault on comitting changes to wc root.
>
> * subversion/clients/cmdline/util.c
> (svn_cl__get_log_message): Set 'path' to "." for wc root, not to NULL.
>
> Patch:
> Index: subversion/clients/cmdline/util.c
> ===================================================================
> --- subversion/clients/cmdline/util.c (revision 5418)
> +++ subversion/clients/cmdline/util.c (working copy)
> @@ -467,6 +467,8 @@
> if (path && lmb->base_dir)
> {
> path = svn_path_is_child(lmb->base_dir, path, pool);
> + if (! path)
> + path = ".";
> }

I suppose that works.

The path handling code here is a trifle confusing:

     const char *path = item->path;
     if (! path)
       path = item->url;
     else if (! *path)
       path = ".";
     if (path && lmb->base_dir)
       {
         path = svn_path_is_child(lmb->base_dir, path, pool);
       }

should we really be running svn_path_is_child on path if path is an
URL? Or is lmb->base_dir NULL in that case? If item->path and
item->url are both null then path ends up as null, can this happen?
Does it matter?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Mar 21 16:54:39 2003

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.