You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Marcus Comstedt <ma...@mc.pp.se> on 2002/08/24 13:19:11 UTC

svn_client_commit with empty targets array => coredump

I just noticed that calling svn_client_commit with an empty array for
the targets argument causes a core dump.  The reason is that
svn_path_condense_targets() will set both base_dir and rel_targets to
NULL if the array is empty, and svn_client_commit() doesn't like this
at all.  Which of the functions should be considered at fault here?
Is there any particular reason why svn_path_condense_targets() on an
empty array doesn't just set base_dir and rel_targets to the empty
string and an empty array respectively?  Setting them to NULL seems to
compilcate the edge cases for no obvious benefit.


  // Marcus



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn_client_commit with empty targets array => coredump

Posted by Branko Čibej <br...@xbc.nu>.
Marcus Comstedt wrote:

>I just noticed that calling svn_client_commit with an empty array for
>the targets argument causes a core dump.  The reason is that
>svn_path_condense_targets() will set both base_dir and rel_targets to
>NULL if the array is empty, and svn_client_commit() doesn't like this
>at all.  Which of the functions should be considered at fault here?
>Is there any particular reason why svn_path_condense_targets() on an
>empty array doesn't just set base_dir and rel_targets to the empty
>string and an empty array respectively?  Setting them to NULL seems to
>compilcate the edge cases for no obvious benefit.
>  
>

Do svn_client_commit (and other APIs that accept dir/array pairs) handle 
the empty/empty case? If they do, then I think your plan is fine.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org