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

[PATCH]: fix segfault on user error

From: David Kimdon <dwhedon_at_debian.org>
Date: 2002-09-23 07:53:30 CEST

Hi,

I confused subversion by creating a file /etc/subversion, not knowing it wanted
a directory by that name (I just did cp ~/.subversion/subversion
/etc/subversion)

$ /usr/local/bin/svn co http://svn.collab.net/repos/svn/trunk upstream
Segmentation fault (core dumped)
$

After applying the included patch I get a much more helpful error message:

$ /usr/local/bin/svn co http://svn.collab.net/repos/svn/trunk upstream
svn: Bogus filename
svn: Can't open config file "/etc/subversion/proxies"
$

-David

* subversion/libsvn_subr/config.c (read_all) : Check return value for all
  calls to svn_config_read().

Index: subversion/libsvn_subr/config.c
===================================================================
--- subversion/libsvn_subr/config.c
+++ subversion/libsvn_subr/config.c 2002-09-22 22:44:53.000000000 -0700
@@ -132,7 +132,7 @@
 #ifdef SVN_WIN32
   if (sys_registry_path)
     {
- svn_config_read (cfgp, sys_registry_path, FALSE, pool);
+ SVN_ERR (svn_config_read (cfgp, sys_registry_path, FALSE, pool));
       red_config = TRUE;
     }
 #endif /* SVN_WIN32 */
@@ -159,7 +159,7 @@
         SVN_ERR (svn_config_merge (*cfgp, sys_file_path, FALSE));
       else
         {
- svn_config_read (cfgp, sys_file_path, FALSE, pool);
+ SVN_ERR (svn_config_read (cfgp, sys_file_path, FALSE, pool));
           red_config = TRUE;
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 23 07:49:08 2002

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.