You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Kimdon <dw...@debian.org> on 2002/09/23 05:53:30 UTC

[PATCH]: fix segfault on user error

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

Re: [PATCH]: fix segfault on user error

Posted by Justin Erenkrantz <je...@apache.org>.
On Sun, Sep 22, 2002 at 10:53:30PM -0700, David Kimdon wrote:
> * subversion/libsvn_subr/config.c (read_all) : Check return value for all
>   calls to svn_config_read().

Segfaults are nice.  =)

Committed in r3209.  Thanks!  -- justin

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