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

[patch] : sigsegv on diff of uncommitted file

From: <dwhedon_at_debian.org>
Date: 2003-01-27 08:10:26 CET

Hi,

Here's a segfault recipe plus a proposed fix.

rm -rf repo/ wc/
svnadmin create repo
svn mkdir -m 'Commit revision 1' file://`pwd`/repo/trunk
svn co file://`pwd`/repo/trunk wc
echo line 1 wc/file
svn add wc/file
svn diff -r 1 wc/file

Any seconds?

-David

* subversion/libsvn_client/diff.c (convert_to_url) : Fix buglet if a path
  has an entry associated with it but no url. This is the case for files
  that have been added but not yet committed.

Index: subversion/libsvn_client/diff.c
===================================================================
--- subversion/libsvn_client/diff.c (revision 4598)
+++ subversion/libsvn_client/diff.c (working copy)
@@ -730,7 +730,7 @@
   SVN_ERR (svn_wc_adm_probe_open (adm_access, NULL, path, FALSE, FALSE, pool));
   SVN_ERR (svn_wc_entry (entry, path, adm_access, FALSE, pool));
   SVN_ERR (svn_wc_adm_close (adm_access));
- if (! entry)
+ if (! entry || ! entry-url)
     return svn_error_createf (SVN_ERR_ENTRY_NOT_FOUND, NULL,
                               convert_to_url: %s is not versioned, path);
   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:19:09 2006

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