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

[PATCH] fs_fs create segfaults on null config

From: Chia-liang Kao <clkao_at_clkao.org>
Date: 2006-02-18 01:03:01 CET

==== Patch <fsfs-config-null> level 1
Source: [No source]
Target: 65390229-12b7-0310-b90b-f21a5aa7ec8e:/trunk:18513
        (http://svn.collab.net/repos/svn)
Log:
Unbreak Perl bindings, fs->config can be null according to
svn_fs.h.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__create): Don't assume fs->config is non-null.
    Also remove a variable that is only used in the same test.

=== subversion/libsvn_fs_fs/fs_fs.c
==================================================================
--- subversion/libsvn_fs_fs/fs_fs.c (revision 18513)
+++ subversion/libsvn_fs_fs/fs_fs.c (patch fsfs-config-null level 1)
@@ -3995,7 +3995,6 @@
                   const char *path,
                   apr_pool_t *pool)
 {
- const char *formatval;
   int format = SVN_FS_FS__FORMAT_NUMBER;
   
   fs->path = apr_pstrdup(pool, path);
@@ -4015,9 +4014,8 @@
   SVN_ERR(svn_fs_fs__set_uuid(fs, svn_uuid_generate(pool), pool));
 
   /* See if we had an explicitly requested no svndiff1. */
- formatval = apr_hash_get(fs->config, SVN_FS_CONFIG_NO_SVNDIFF1,
- APR_HASH_KEY_STRING);
- if (formatval)
+ if (fs->config && apr_hash_get(fs->config, SVN_FS_CONFIG_NO_SVNDIFF1,
+ APR_HASH_KEY_STRING))
     format = 1;
   
   SVN_ERR(write_revision_zero(fs));

==== BEGIN SVK PATCH BLOCK ====
Version: svk 1.06 (freebsd)

eJyFk01v0zAYxyshLv0EO/qQjQ1oF9t5aYpUdRKDoUlTtRckLkRO8qSN8OzKdiom+dILd66cEF9p
N/gsIBx3m3oALXKixM/z/z0vzvNGXb6aYjuZhDbAob14fzoez5gpF7vuK0gsVI2RKogthxXwgFou
50FkBbsGZzVMzcFMJtiJRxvxsRfcQ6KOUTAjhQ4yD8uNAgiwjaaxnRI7pU5qsTPKJYhcSWlcMDwK
k9hZ8y6nkksNeaft/OPOnwQ42giqRkHpAt50nrotVqB0I4Vn3nNox4nvOFsCix+A9B9AQreAh7wp
9ErktXbLZ/AonTzQo/vy6oZDQPH/uIf+OSx9Qo/y6YbvrWy55De5gc+mAm6Yj0mJhboOi5LQCOoQ
xzSKSwhZmtI4K+MiJS6vxJ3aWa/35Xu3nvqX7l7/ebL+DTsveuvbHbdh1rf4a2+2/hl+6/34uP61
29Rov9aDSSlF3czR3h7y19HsPD85ujjJT48/5BeX5+/O3h5Mo+1j9B24y65Ok6SkJGZZkVYFxQke
jWjGaAUJxWGU+kMkJLVXolDAPqEZKI6KRlSNmOuXaCuBkglUABIt54iVpVSdCzKyv+ntcDHs95+j
R9reR2j/YTPPSxfTwMEYvZbimUFM6/YatoM2GgkpBl3QYd+Xz7VECq7lChBDK6YaVnBAZsFM5ywF
v0Gthgo1wm0C0m6KkAFthv0AJ7bWDr5he+hkQqyrfzNXl37UxuMr0XQ1ML6bWDeIS2YWbioVrNxH
2zaVm7dDo1rxyf9AMaYBTWwS0ywkJBtgUqSD0HV3UGRhMagJZjFjKZQj+At/8lYH
==== END SVK PATCH BLOCK ====

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 18 01:01:34 2006

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.