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

[PATCH] Don't segfault on bogus URL

From: <epg_at_google.com>
Date: Mon, 12 May 2008 19:46:24 -0700

[[[
Fix segmentation fault in svn_ra_open3 when passed a bogus URL such as
'bogusURL'.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_open3): Raise SVN_ERR_RA_ILLEGAL_URL if repos_URI.hostname is
    NULL rather than passing that NULL to svn_config_find_group().
]]]

Index: subversion/libsvn_ra/ra_loader.c
===================================================================
--- subversion/libsvn_ra/ra_loader.c (revision 31146)
+++ subversion/libsvn_ra/ra_loader.c (working copy)
@@ -454,7 +454,7 @@ svn_error_t *svn_ra_open3(svn_ra_session_t **sessi
           /* Find out where we're about to connect to, and
            * try to pick a server group based on the destination. */
           apr_err = apr_uri_parse(pool, repos_URL, &repos_URI);
- if (apr_err != APR_SUCCESS)
+ if (apr_err != APR_SUCCESS || repos_URI.hostname == NULL)
             return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
                                      _("Illegal repository URL '%s'"),
                                      repos_URL);

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-13 04:46:46 CEST

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.