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

Re: segmentation fault with `svn copy'

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2003-06-02 18:50:43 CEST

Faheem Mitha <faheem@email.unc.edu> writes:

> faheem ~/cotmp/mg-ro>mkdir bar
> faheem ~/cotmp/mg-ro>svn cp bar foo
> Segmentation fault

Ahh, we're not checking for a NULL entry.

Does this patch fix the segfault for you? It seems to fix it for me:

Index: subversion/libsvn_wc/copy.c
===================================================================
--- subversion/libsvn_wc/copy.c (revision 6114)
+++ subversion/libsvn_wc/copy.c (working copy)
@@ -284,6 +284,10 @@
      in the repository. See comment at the bottom of this file for an
      explanation. */
   SVN_ERR (svn_wc_entry (&src_entry, src_path, src_access, FALSE, pool));
+ if (src_entry == NULL)
+ return svn_error_createf (SVN_ERR_UNVERSIONED_RESOURCE, NULL,
+ "'%s' isn't a versioned directory.", src_path);
+
   if ((src_entry->schedule == svn_wc_schedule_add)
       || (! src_entry->url))
     return svn_error_createf

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 2 18:54:56 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.