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

svn_client_copy4 crashes when caller doesn't want commit info (was: Re: svn commit: r23219 - trunk/subversion/libsvn_client)

From: David James <james_at_cs.toronto.edu>
Date: 2007-08-11 19:12:50 CEST

On 1/24/07, hwright@tigris.org <hwright@tigris.org> wrote:
> * subversion/libsvn_client/copy.c
> (svn_client_copy4, svn_client_move5): Use a subpool for calls to
> setup_copy(). Copy *commit_info_p into the main pool before destroying the
> subpool.

Hi Hyrum,

In r23219 and friends, you changed svn_client_copy4 and
svn_client_move5 so that it unconditionally sets *commit_info_p. This
causes these functions to segfault if the user set commit_info_p to
NULL so as to indicate that they don't want commit info (e.g., because
they are doing a WC-to-WC copy, where no commit is occurring).

The API docs for svn_client_move5 don't say explicitly whether users
are allowed to pass NULL for commit_info_p is allowed, but in the
ctypes Python bindings we assumed that this is allowed and it worked
fine with Subversion 1.4 for wc to wc copies.

I think it would be a good idea to patch svn_client_copy4,
svn_client_move5, and their documentation to explicitly allow passing
NULL, both for the sake of compatibility and API convenience.

Thoughts?

David

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Aug 11 19:10:53 2007

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